From 38b214971edf83b963e66daca3b0b016d24f56cb Mon Sep 17 00:00:00 2001 From: Ole Tange Date: Sun, 18 Jan 2015 21:54:43 +0100 Subject: [PATCH] parallel: Fixed bug #43967: Error if there exists a bin/zsh or bin/bash dir (with zsh or bash). --- src/parallel | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/parallel b/src/parallel index 48da1d3d..5b16b0e4 100755 --- a/src/parallel +++ b/src/parallel @@ -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; }