diff options
-rw-r--r-- | bin/isolated-functions.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh index 9d633973b..574f949d7 100644 --- a/bin/isolated-functions.sh +++ b/bin/isolated-functions.sh @@ -525,7 +525,14 @@ hasv() { } has() { - [[ " ${*:2} " == *" $1 "* ]] + local needle=$1 + shift + + local x + for x in "$@"; do + [ "${x}" = "${needle}" ] && return 0 + done + return 1 } # @FUNCTION: save_ebuild_env |