X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=FS%2FFS%2Fpart_export%2Fshellcommands.pm;h=edbe78f03a977ae46d0beb70774cceb76191757b;hb=eee6d96f68294389e3e1659e18a945ff2e5c47e5;hp=59146306d51e50254a21ade95c19600907ace315;hpb=860445eb4e5389ae310496a199d69e414d2428c9;p=freeside.git diff --git a/FS/FS/part_export/shellcommands.pm b/FS/FS/part_export/shellcommands.pm index 59146306d..edbe78f03 100644 --- a/FS/FS/part_export/shellcommands.pm +++ b/FS/FS/part_export/shellcommands.pm @@ -498,13 +498,18 @@ sub ssh_cmd { #subroutine, not method return if $opt->{'ignore_all_output'}; die "Error running SSH command: ". $ssh->error if $ssh->error; - if ($errput && $opt->{'ignored_errors'} && length($opt->{'ignored_errors'})) { + if ( ($output || $errput) + && $opt->{'ignored_errors'} && length($opt->{'ignored_errors'}) + ) { my @ignored_errors = split('\n',$opt->{'ignored_errors'}); foreach my $ignored_error ( @ignored_errors ) { + $output =~ s/$ignored_error//g; $errput =~ s/$ignored_error//g; } + chomp($output); chomp($errput); } + die $errput if $errput; die $output if $output; '';