forked from lix-project/lix
nix develop: do not assume that saved vars are set
This fixes https://github.com/NixOS/nix/issues/6809
This commit is contained in:
parent
de287964d5
commit
04386f7d69
|
@ -288,8 +288,10 @@ struct Common : InstallableCommand, MixProfile
|
||||||
|
|
||||||
out << "unset shellHook\n";
|
out << "unset shellHook\n";
|
||||||
|
|
||||||
for (auto & var : savedVars)
|
for (auto & var : savedVars) {
|
||||||
|
out << fmt("%s=${%s:-}\n", var, var);
|
||||||
out << fmt("nix_saved_%s=\"$%s\"\n", var, var);
|
out << fmt("nix_saved_%s=\"$%s\"\n", var, var);
|
||||||
|
}
|
||||||
|
|
||||||
buildEnvironment.toBash(out, ignoreVars);
|
buildEnvironment.toBash(out, ignoreVars);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue