Fix issue with powershell windows exec. need to remove stderr

This commit is contained in:
garnier-quentin 2019-04-08 18:29:29 +02:00
parent a2fdbe2094
commit bab984c1a7
1 changed files with 5 additions and 2 deletions

View File

@ -55,9 +55,12 @@ sub windows_execute {
$options{output}->option_exit();
};
my $job = Win32::Job->new;
my $stderr = 'NUL';
$stderr = \*TO_PARENT if ($options{output}->is_debug());
if (!($pid = $job->spawn(undef, $cmd,
{ stdout => \*TO_PARENT,
stderr => \*TO_PARENT }))) {
{ stdin => 'NUL',
stdout => \*TO_PARENT,
stderr => $stderr }))) {
$options{output}->add_option_msg(short_msg => "Internal error: execution issue: $^E");
$options{output}->option_exit();
}