mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-29 16:45:04 +02:00
Fix issue with powershell windows exec. need to remove stderr
This commit is contained in:
parent
a2fdbe2094
commit
bab984c1a7
@ -55,9 +55,12 @@ sub windows_execute {
|
|||||||
$options{output}->option_exit();
|
$options{output}->option_exit();
|
||||||
};
|
};
|
||||||
my $job = Win32::Job->new;
|
my $job = Win32::Job->new;
|
||||||
|
my $stderr = 'NUL';
|
||||||
|
$stderr = \*TO_PARENT if ($options{output}->is_debug());
|
||||||
if (!($pid = $job->spawn(undef, $cmd,
|
if (!($pid = $job->spawn(undef, $cmd,
|
||||||
{ stdout => \*TO_PARENT,
|
{ stdin => 'NUL',
|
||||||
stderr => \*TO_PARENT }))) {
|
stdout => \*TO_PARENT,
|
||||||
|
stderr => $stderr }))) {
|
||||||
$options{output}->add_option_msg(short_msg => "Internal error: execution issue: $^E");
|
$options{output}->add_option_msg(short_msg => "Internal error: execution issue: $^E");
|
||||||
$options{output}->option_exit();
|
$options{output}->option_exit();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user