[freeside-commits] freeside/FS/FS/part_export shellcommands.pm, 1.63, 1.64
Ivan,,,
ivan at wavetail.420.am
Sat Feb 11 17:22:50 PST 2012
Update of /home/cvs/cvsroot/freeside/FS/FS/part_export
In directory wavetail.420.am:/tmp/cvs-serv4166
Modified Files:
shellcommands.pm
Log Message:
apply shellcommands ignored_errors regexen to STDOUT as well as STDERR, RT#15347
Index: shellcommands.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_export/shellcommands.pm,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -w -d -r1.63 -r1.64
--- shellcommands.pm 29 Jan 2012 06:15:12 -0000 1.63
+++ shellcommands.pm 12 Feb 2012 01:22:47 -0000 1.64
@@ -498,13 +498,18 @@
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;
'';
More information about the freeside-commits
mailing list