aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Guldstrand <andreas.guldstrand@gmail.com>2015-12-15 10:12:14 +0100
committerAndreas Guldstrand <andreas.guldstrand@gmail.com>2015-12-15 10:12:14 +0100
commit678ca13d54c3b70206f2f74aaa35500ecee850ee (patch)
tree6a184acada8ec76a72e9404d6df1c62511b11146
parent00d0f5bc0c9efcdb04aa6df88ff0afb4451b9f24 (diff)
downloadsbotools2-678ca13d54c3b70206f2f74aaa35500ecee850ee.tar.xz
If system()s return value is not 0, we need to bitshift it
-rwxr-xr-xt/travis.t2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/travis.t b/t/travis.t
index b762106..8f4d86c 100755
--- a/t/travis.t
+++ b/t/travis.t
@@ -25,7 +25,7 @@ sub run {
my $cmd = shift @{ $args{cmd} };
my @cmd = ('sudo', $^X, "-I$lib", "$path/$cmd", @{ $args{cmd} });
my $exit = $args{exit};
- my ($output, $return) = capture_merged { system(@cmd) };
+ my ($output, $return) = capture_merged { system(@cmd) and $? >> 8; };
return $output if $return == $exit;
return "Command $cmd ($path/$cmd) exited with $return instead of $exit";
}