mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-12-23 13:17:54 +00:00
parallel: Fixed bug #43967: Error if there exists a bin/zsh or bin/bash dir (with zsh or bash).
This commit is contained in:
parent
29ce26de3f
commit
38b214971e
|
@ -3141,7 +3141,8 @@ sub which {
|
|||
# @full_path = full paths to @programs. Nothing if not found
|
||||
my @which;
|
||||
for my $prg (@_) {
|
||||
push @which, map { $_."/".$prg } grep { -x $_."/".$prg } split(":",$ENV{'PATH'});
|
||||
push @which, grep { not -d $_ and -x $_ }
|
||||
map { $_."/".$prg } split(":",$ENV{'PATH'});
|
||||
}
|
||||
return @which;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue