diff options
author | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2015-12-15 10:12:14 +0100 |
---|---|---|
committer | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2015-12-15 10:12:14 +0100 |
commit | 678ca13d54c3b70206f2f74aaa35500ecee850ee (patch) | |
tree | 6a184acada8ec76a72e9404d6df1c62511b11146 | |
parent | 00d0f5bc0c9efcdb04aa6df88ff0afb4451b9f24 (diff) | |
download | sbotools2-678ca13d54c3b70206f2f74aaa35500ecee850ee.tar.xz |
If system()s return value is not 0, we need to bitshift it
-rwxr-xr-x | t/travis.t | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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"; } |