diff options
author | Philip Sequeira <phsequei@gmail.com> | 2015-09-19 19:26:22 -0400 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-09-20 14:21:03 +0200 |
commit | bad743aed5a8fd22742317c344f126f04a0392ca (patch) | |
tree | bae22a7788885af490580bdce2727396e32fbcd9 /TOOLS/zsh.pl | |
parent | 126367bb098d0a5a44b8bfa8f1699a2a1ccb0f41 (diff) | |
download | mpv-bad743aed5a8fd22742317c344f126f04a0392ca.tar.bz2 mpv-bad743aed5a8fd22742317c344f126f04a0392ca.tar.xz |
TOOLS/zsh.pl: only check the actual exit code when calling mpv
Ignore the other bits of $?. Apparently they can be set even if the
command succeeded.
Diffstat (limited to 'TOOLS/zsh.pl')
-rwxr-xr-x | TOOLS/zsh.pl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/TOOLS/zsh.pl b/TOOLS/zsh.pl index 91b15bbde5..309c0d4b22 100755 --- a/TOOLS/zsh.pl +++ b/TOOLS/zsh.pl @@ -232,8 +232,8 @@ sub call_mpv { my $output = `"$mpv" --no-config $cmd`; if ($? == -1) { die "Could not run mpv: $!"; - } elsif ($? != 0) { - die "mpv returned " . ($? >> 8) . " with output:\n$output"; + } elsif ((my $exit_code = $? >> 8) != 0) { + die "mpv returned $exit_code with output:\n$output"; } return split /\n/, $output; } |