From 0e3fea5006df39bc93a3ca95ace022c7947a30ab Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 7 Oct 2005 01:17:58 +0000 Subject: (raw) do not clober output files (stdout or stderr) when binary cannot be found (#18987) --- perl-install/run_program.pm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'perl-install/run_program.pm') 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//; -- cgit v1.2.1