patch-shebangs: fix `env -S` with only one argument (#378221)

K900 622b5334 7849b08d

Changed files
+1 -1
pkgs
build-support
setup-hooks
+1 -1
pkgs/build-support/setup-hooks/patch-shebangs.sh
···
if [[ "$oldPath" == *"/bin/env" ]]; then
if [[ $arg0 == "-S" ]]; then
arg0=${args%% *}
-
args=${args#* }
+
[[ "$args" == *" "* ]] && args=${args#* } || args=
newPath="$(PATH="${!pathName}" type -P "env" || true)"
args="-S $(PATH="${!pathName}" type -P "$arg0" || true) $args"