Fix condition to detect empty output
And remove some whitespace
This commit is contained in:
parent
9a43dce034
commit
90bcdf1054
1 changed files with 6 additions and 6 deletions
|
|
@ -163,7 +163,7 @@ sub fetch {
|
|||
my @lines = <$data>;
|
||||
close $data or carp "unable to close: $ERRNO";
|
||||
# If error output, print the cache (if exist) and exit
|
||||
if ( @cache_data > 0 ) {
|
||||
if ( @lines == 0 ) {
|
||||
if ( @cache_data > 0 ) {
|
||||
print join q{}, @cache_data[ 1 .. $#cache_data ];
|
||||
exit 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue