From 2332759d7abfa3c9cd8bd17d27e9db94fbce1327 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Mon, 9 Dec 2024 19:17:26 +0100 Subject: [PATCH] stdenv: fix nix develop This was introduced in #360466. --- pkgs/stdenv/generic/setup.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index 04382f4a89337..541689287970b 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -450,7 +450,9 @@ concatStringsSep() { -a*) # \036 is the "record separator" character. We assume that this will never need to be part of # an argument string we create here. If anyone ever hits this limitation: Feel free to refactor. - local IFS=$'\036' ;; + # To avoid leaking an unescaped rs character when dumping the environment with nix, we use printf + # in a subshell. + local IFS="$(printf '\036')" ;; *) local IFS=" " ;;