From 6f024f6e6517d052221e6e1d3383ec326f04aeae Mon Sep 17 00:00:00 2001 From: Albert Safin Date: Thu, 19 Sep 2019 09:43:34 +0000 Subject: [PATCH] setup.sh: avoid subshells: type -t --- pkgs/stdenv/generic/setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index 326a60676a26..60067a4051de 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -98,7 +98,7 @@ _callImplicitHook() { # hooks exits the hook, not the caller. Also will only pass args if # command can take them _eval() { - if [ "$(type -t "$1")" = function ]; then + if declare -F "$1" > /dev/null 2>&1; then set +u "$@" # including args else