mirror of
https://github.com/mpv-player/mpv
synced 2025-01-09 16:39:49 +00:00
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.
This commit is contained in:
parent
126367bb09
commit
bad743aed5
@ -232,8 +232,8 @@ sub call_mpv {
|
|||||||
my $output = `"$mpv" --no-config $cmd`;
|
my $output = `"$mpv" --no-config $cmd`;
|
||||||
if ($? == -1) {
|
if ($? == -1) {
|
||||||
die "Could not run mpv: $!";
|
die "Could not run mpv: $!";
|
||||||
} elsif ($? != 0) {
|
} elsif ((my $exit_code = $? >> 8) != 0) {
|
||||||
die "mpv returned " . ($? >> 8) . " with output:\n$output";
|
die "mpv returned $exit_code with output:\n$output";
|
||||||
}
|
}
|
||||||
return split /\n/, $output;
|
return split /\n/, $output;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user