diff options
author | Albert Safin <xzfcpw@gmail.com> | 2019-09-19 09:43:34 +0000 |
---|---|---|
committer | Albert Safin <xzfcpw@gmail.com> | 2019-09-20 02:45:52 +0000 |
commit | 6f024f6e6517d052221e6e1d3383ec326f04aeae (patch) | |
tree | 46d7b9ef37642c5830b9c41ee42a2931452ee72d /pkgs/stdenv | |
parent | 463463b3951422c734cf33b1456ba9264a586293 (diff) |
setup.sh: avoid subshells: type -t
Diffstat (limited to 'pkgs/stdenv')
-rw-r--r-- | pkgs/stdenv/generic/setup.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index 326a60676a268..60067a4051de4 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 |