diff --git a/pkgs/build-support/setup-hooks/multiple-outputs.sh b/pkgs/build-support/setup-hooks/multiple-outputs.sh index 3a318933f138..9781a8d1bc03 100644 --- a/pkgs/build-support/setup-hooks/multiple-outputs.sh +++ b/pkgs/build-support/setup-hooks/multiple-outputs.sh @@ -15,8 +15,8 @@ _assignFirst() { local varName="$1" local REMOVE=REMOVE # slightly hacky - we allow REMOVE (i.e. not a variable name) shift - for var in "$@"; do - if [ -n "${!var-}" ]; then eval "${varName}"="${var}"; return; fi + for _var in "$@"; do + if [ -n "${!_var-}" ]; then eval "${varName}"="${_var}"; return; fi done echo echo "error: _assignFirst: could not find a non-empty variable to assign to ${varName}."