diff --git a/pkgs/build-support/setup-hooks/make-wrapper.sh b/pkgs/build-support/setup-hooks/make-wrapper.sh index 96e50773138b..eebde886a884 100644 --- a/pkgs/build-support/setup-hooks/make-wrapper.sh +++ b/pkgs/build-support/setup-hooks/make-wrapper.sh @@ -132,6 +132,9 @@ wrapProgram() { local prog="$1" local hidden hidden="$(dirname "$prog")/.$(basename "$prog")"-wrapped + while [ -e "$hidden" ]; do + hidden="${hidden}_" + done mv "$prog" "$hidden" # Silence warning about unexpanded $0: # shellcheck disable=SC2016