[Bps-public-commit] r19017 - Shipwright/trunk/share/bin
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Wed Apr 1 21:11:13 EDT 2009
Author: sunnavy
Date: Wed Apr 1 21:11:12 2009
New Revision: 19017
Modified:
Shipwright/trunk/share/bin/shipwright-builder
Log:
tweak the error msg: after system() fails, $! is not always for that call
Modified: Shipwright/trunk/share/bin/shipwright-builder
==============================================================================
--- Shipwright/trunk/share/bin/shipwright-builder (original)
+++ Shipwright/trunk/share/bin/shipwright-builder Wed Apr 1 21:11:12 2009
@@ -410,8 +410,12 @@
$skip_test ? '--skip-test' : (), $args{'force'} ? '--force' : (),
$args{'clean'} ? '--clean' : ();
if ( system($cmd . $system_cmd_pipe) ) {
- print $log "Build $dir failed: $!.\n";
- confess "Build $dir failed: $!.\n";
+ print $log "build $dir $type failed" . (
+ $? == -1
+ ? ": $!"
+ : ( ' with value ' . ( $? >> 8 ) )
+ ) . "\n";
+ confess "Build $dir failed\n";
}
}
else {
@@ -430,7 +434,11 @@
print $log "Running shipwright build command: $cmd\n";
if ( system($cmd . $system_cmd_pipe) ) {
- print $log "build $dir $type failed: $!.\n";
+ print $log "build $dir $type failed" . (
+ $? == -1
+ ? ": $!"
+ : ( ' with value ' . ( $? >> 8 ) )
+ ) . "\n";
if ( $type eq 'test' ) {
if ( $args{force} ) {
print $log
@@ -703,7 +711,7 @@
for my $name ( keys %{ $args{with} } ) {
my $cmd = cmd( $name, $args{with}{$name} );
if ($cmd) {
- system($cmd) && confess "$cmd failed: $!";
+ system($cmd) && confess "$cmd failed";
}
}
}
More information about the Bps-public-commit
mailing list