File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -298,15 +298,11 @@ sub command_exit_is
298
298
my $h = IPC::Run::start $cmd ;
299
299
$h -> finish();
300
300
301
- # On Windows, the exit status of the process is returned directly as the
302
- # process's exit code, while on Unix, it's returned in the high bits
303
- # of the exit code (see WEXITSTATUS macro in the standard <sys/wait.h>
304
- # header file). IPC::Run's result function always returns exit code >> 8,
305
- # assuming the Unix convention, which will always return 0 on Windows as
306
- # long as the process was not terminated by an exception. To work around
307
- # that, use $h->full_result on Windows instead.
301
+ # Normally, if the child called exit(N), IPC::Run::result() returns N. On
302
+ # Windows, with IPC::Run v20220807.0 and earlier, full_results() is the
303
+ # method that returns N (https://github.com/toddr/IPC-Run/issues/161).
308
304
my $result =
309
- ($Config {osname } eq " MSWin32" )
305
+ ($Config {osname } eq " MSWin32" && $IPC::Run::VERSION <= 20220807.0 )
310
306
? ($h -> full_results)[0]
311
307
: $h -> result(0);
312
308
is($result , $expected , $test_name );
You can’t perform that action at this time.
0 commit comments