summaryrefslogtreecommitdiffstats
path: root/perl-install/run_program.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2005-10-07 01:17:58 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2005-10-07 01:17:58 +0000
commit0e3fea5006df39bc93a3ca95ace022c7947a30ab (patch)
tree9474d12085085eb0673fdfbfc97d9eceb2ac8a63 /perl-install/run_program.pm
parentbd92a15acd674ceaf9d9109544a8f2fec761b0cb (diff)
downloaddrakx-0e3fea5006df39bc93a3ca95ace022c7947a30ab.tar
drakx-0e3fea5006df39bc93a3ca95ace022c7947a30ab.tar.gz
drakx-0e3fea5006df39bc93a3ca95ace022c7947a30ab.tar.bz2
drakx-0e3fea5006df39bc93a3ca95ace022c7947a30ab.tar.xz
drakx-0e3fea5006df39bc93a3ca95ace022c7947a30ab.zip
(raw) do not clober output files (stdout or stderr) when binary cannot be found (#18987)
Diffstat (limited to 'perl-install/run_program.pm')
-rw-r--r--perl-install/run_program.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/perl-install/run_program.pm b/perl-install/run_program.pm
index f74edb5b6..b1b871076 100644
--- a/perl-install/run_program.pm
+++ b/perl-install/run_program.pm
@@ -104,6 +104,8 @@ sub raw {
log::l($_[0]);
c::_exit(128);
}
+ my $binary = ref $name ? $name->[0] : $name;
+ die_exit "program not found: $binary" if !find { -x $_ } $binary, map { "$_/$binary" } split(':', $ENV{PATH});
if ($stderr && $stderr eq 'STDERR') {
} elsif ($stderr) {
$stderr_mode =~ s/2//;