Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not call GetTerminalSize if STDOUT is not a tty #110

Merged
merged 1 commit into from
Apr 7, 2018

Conversation

mscherer
Copy link
Contributor

@mscherer mscherer commented Apr 6, 2018

Followup of the bug fix in #86, triggered by running needrestart
with yum/dnf in cron

Copy link
Owner

@liske liske left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update your PR.

@@ -129,8 +129,9 @@ sub _progress_inc {

sub _progress_out {
my $self = shift;

my ($columns) = GetTerminalSize(\*STDOUT);
my $columns = 10;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use 80 as fallback value.

@@ -142,10 +143,11 @@ sub _progress_out {

sub _progress_fin {
my $self = shift;
my $columns;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable should also be set to 80 to prevent perl warnings about using undefined value in line 152.

Followup of the bug fix in liske#86, triggered by running needrestart
with yum/dnf in cron
@mscherer
Copy link
Contributor Author

mscherer commented Apr 6, 2018

Done

@liske liske merged commit 7d6d035 into liske:master Apr 7, 2018
@liske
Copy link
Owner

liske commented Apr 7, 2018

Thanks!

@liske liske added the bug label Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants