mirror of
https://github.com/NixOS/nix
synced 2025-07-05 04:01:47 +02:00
nix dev-shell: Unset shellHook
This avoids inheriting the caller's shellHook, which can happen when running a dev-shell inside a dev-shell.
This commit is contained in:
parent
efe6c186ea
commit
0135fd6ec4
1 changed files with 2 additions and 0 deletions
|
@ -172,6 +172,8 @@ struct Common : InstallableCommand, MixProfile
|
||||||
|
|
||||||
void makeRcScript(const BuildEnvironment & buildEnvironment, std::ostream & out)
|
void makeRcScript(const BuildEnvironment & buildEnvironment, std::ostream & out)
|
||||||
{
|
{
|
||||||
|
out << "unset shellHook\n";
|
||||||
|
|
||||||
out << "nix_saved_PATH=\"$PATH\"\n";
|
out << "nix_saved_PATH=\"$PATH\"\n";
|
||||||
|
|
||||||
for (auto & i : buildEnvironment.env) {
|
for (auto & i : buildEnvironment.env) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue