Closed pschyska closed 1 year ago
Describe the bug
Since https://github.com/numtide/devshell/commit/a773f912ea85cdfa04a13070431abfc0c19ce79f, the "prefix" envs are incorrectly quoted.
escapeShellArg single-quotes its arguments, but extras/language/c.nix (e.g.) wants to substitute $DEVSHELL_DIR. It's probably broken in other places in here as well, and for anyone that tries to substitute prefixes in their downstream flakes.
escapeShellArg
$DEVSHELL_DIR
To Reproduce
{ description = "repro"; inputs.devshell.url = "github:numtide/devshell"; outputs = { self, devshell }: { devShell.x86_64-linux = devshell.legacyPackages.x86_64-linux.mkShell { motd = ""; env = [ { name = "TESTIK"; prefix = "$PWD/testik"; } ]; devshell.startup.test.text = '' if ! [[ $TESTIK = "$PWD/testik" ]]; then printf "\$TESTIK is wrong, want %s, got %s\n" "$PWD/testik" "$TESTIK" fi ''; }; }; }
Steps to reproduce the behavior:
nix develop
Expected behavior No output like $TESTIK is wrong, want /tmp/tmp.U8txOCv4Dz/testik, got /tmp/tmp.U8txOCv4Dz/$PWD/testik.
$TESTIK is wrong, want /tmp/tmp.U8txOCv4Dz/testik, got /tmp/tmp.U8txOCv4Dz/$PWD/testik
Thank you, it seemed to have worked
Describe the bug
Since https://github.com/numtide/devshell/commit/a773f912ea85cdfa04a13070431abfc0c19ce79f, the "prefix" envs are incorrectly quoted.
escapeShellArg
single-quotes its arguments, but extras/language/c.nix (e.g.) wants to substitute$DEVSHELL_DIR
. It's probably broken in other places in here as well, and for anyone that tries to substitute prefixes in their downstream flakes.To Reproduce
Steps to reproduce the behavior:
nix develop
with the given flake.nixExpected behavior No output like
$TESTIK is wrong, want /tmp/tmp.U8txOCv4Dz/testik, got /tmp/tmp.U8txOCv4Dz/$PWD/testik
.