forked from lix-project/hydra
RunCommand: use IPC::Run3::run3 instead
run3 just seems to do better handling for what we want to do, and requires less deep-reaching changes to this plugin to get it to play nice, as IPC::Run::run would.
This commit is contained in:
parent
3e722f1d0a
commit
fdf6f4d3da
|
@ -10,7 +10,7 @@ use Hydra::Model::DB;
|
|||
use Hydra::Helper::Nix;
|
||||
use File::Basename qw(dirname);
|
||||
use File::Path qw(make_path);
|
||||
use IPC::Run;
|
||||
use IPC::Run3;
|
||||
|
||||
sub isEnabled {
|
||||
my ($self) = @_;
|
||||
|
@ -178,9 +178,7 @@ sub buildFinished {
|
|||
open(my $f, '>', $logPath);
|
||||
umask($oldUmask);
|
||||
|
||||
my $stdin = "";
|
||||
my @cmd = ["sh", "-c", $command];
|
||||
IPC::Run::run(@cmd, \$stdin, $f, '2>&1') == 1
|
||||
run3($command, \undef, $f, $f, { return_if_system_error => 1 }) == 1
|
||||
or warn "notification command '$command' failed with exit status $? ($!)\n";
|
||||
|
||||
close($f);
|
||||
|
|
Loading…
Reference in a new issue