Skip to content

Commit

Permalink
fix(commercialhaskell#5008): "Invalid option --internal-re-exec-versi…
Browse files Browse the repository at this point in the history
…on" error when using "nix" with options "enable: true", "pure: true", "shell-file: .." -> prevent entering "nix-shell --pure" recursively by exporting STACK_IN_NIX_SHELL properly
  • Loading branch information
srghma committed Dec 25, 2019
1 parent 44e8ab2 commit 6022535
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Stack/Nix.hs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ runShellAndExit = do
F.</> "nix-gc-symlinks" F.</> "gc-root"] else []
,map T.unpack (nixShellOptions (configNix config))
,nixopts
,["--run", unwords (cmnd:"$STACK_IN_NIX_EXTRA_ARGS":args')]
,["--run", unwords ("export STACK_IN_NIX_SHELL=true;":cmnd:"$STACK_IN_NIX_EXTRA_ARGS":args')]
]
-- Using --run instead of --command so we cannot
-- end up in the nix-shell if stack build is Ctrl-C'd
Expand Down

0 comments on commit 6022535

Please sign in to comment.