Slightly change find_program() to search the PATH manually; using
system("which ...") does not appear to work uniformly across different platforms This commit was SVN r7775.
Этот коммит содержится в:
родитель
7e45f64065
Коммит
9d5f597b7f
@ -314,10 +314,10 @@ sub find_program {
|
|||||||
# loop through the list and save the first one that we find
|
# loop through the list and save the first one that we find
|
||||||
my $i = 0;
|
my $i = 0;
|
||||||
while ($i <= $#names) {
|
while ($i <= $#names) {
|
||||||
my $ret = system("which $names[$i] 2>&1 >/dev/null");
|
foreach my $dir (split(/:/, $ENV{PATH})) {
|
||||||
my $status = $ret >> 8;
|
if (-x "$dir/$names[$i]") {
|
||||||
if ($status == 0) {
|
return $names[$i];
|
||||||
return $names[$i];
|
}
|
||||||
}
|
}
|
||||||
++$i;
|
++$i;
|
||||||
}
|
}
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user