Changeset 1595 in ProjectBuilder for devel/pb-modules/lib/ProjectBuilder/Base.pm
- Timestamp:
- May 24, 2012, 10:54:48 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb-modules/lib/ProjectBuilder/Base.pm
r1592 r1595 137 137 The first parameter is the shell command to call. This command should NOT use redirections. 138 138 The second parameter is the message to print on screen. If none is given, then the command is printed. 139 The third parameter print the result of the command after correct execution if value is verbose. If value is noredir, it avoids redirecting outputs (e.g. for vi). If value is quiet, doesn't print anything at all. 140 The fourth parameter determines whether failure of the command is ok even if $Global::pb_stop_on_error is set, because the caller will be handling the error. 139 The third parameter prints the result of the command after correct execution if value is "verbose". If value is "noredir", it avoids redirecting outputs (e.g. for vi). If value is "quiet", doesn't print anything at all. If value is "mayfail", failure of the command is ok even if $Global::pb_stop_on_error is set, because the caller will be handling the error. 141 140 This function returns as a result the return value of the system command. 142 141 … … 150 149 my $cmt=shift || $cmd; 151 150 my $verbose=shift || undef; 152 my $failure_ok = shift || 0;153 151 my $redir = ""; 154 152 … … 177 175 178 176 if (defined $error) { 179 pb_log(0, $error) if (((! defined $verbose) || ($verbose ne "quiet")) || ($Global::pb_stop_on_error && ! $failure_ok));177 pb_log(0, $error) if (((! defined $verbose) || ($verbose ne "quiet")) || ($Global::pb_stop_on_error)); 180 178 pb_display_file("$ENV{'PBTMP'}/system.$$.log") if ((-f "$ENV{'PBTMP'}/system.$$.log") and ((! defined $verbose) || ($verbose ne "quiet") || $Global::pb_stop_on_error)); 181 if ( ($Global::pb_stop_on_error) && (! $failure_ok)) {179 if ($Global::pb_stop_on_error) { 182 180 confess "error running command ($cmd) with cwd=$cwd, pid=$$"; 183 181 }
Note:
See TracChangeset
for help on using the changeset viewer.