mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 05:56:15 +02:00
nix shell: don't set environment variables unnecessarily
This commit is contained in:
parent
9d2f91d1ea
commit
4a9c72b389
1 changed files with 3 additions and 1 deletions
|
@ -131,7 +131,9 @@ struct CmdShell : InstallablesCommand, MixEnvironment
|
|||
setEnv("PATH", unixPathString.c_str());
|
||||
|
||||
for (auto const& pathV : extraPathVarMapping) {
|
||||
setenv(pathV.first.c_str(), concatStringsSep(":", extraPathVars[pathV.first]).c_str(), 1);
|
||||
if (!extraPathVars[pathV.first].empty()) {
|
||||
setenv(pathV.first.c_str(), concatStringsSep(":", extraPathVars[pathV.first]).c_str(), 1);
|
||||
}
|
||||
}
|
||||
|
||||
setenv("IN_NIX3_SHELL", "1", 1);
|
||||
|
|
Loading…
Reference in a new issue