forked from lix-project/lix
Merge pull request #6810 from jfly/jfly/do-not-assume-savedvars-exist
nix develop: do not assume that saved vars are set
This commit is contained in:
commit
59764eb842
|
@ -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