mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2025-02-16 15:17:18 +02:00
dropEmptyInitThenConcatStringsSep -> concatStringSep: PATH handling
It's still wrong, but one step closer to correct. Not that anyone should use "" or "." in their PATH, but that is not for us to intervene.
This commit is contained in:
parent
9ca42d5da2
commit
76b2d5ef3d
1 changed files with 3 additions and 1 deletions
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include "command.hh"
|
||||
#include "run.hh"
|
||||
#include "strings.hh"
|
||||
|
||||
using namespace nix;
|
||||
|
||||
|
@ -92,9 +93,10 @@ struct CmdShell : InstallablesCommand, MixEnvironment
|
|||
}
|
||||
}
|
||||
|
||||
// TODO: split losslessly; empty means .
|
||||
auto unixPath = tokenizeString<Strings>(getEnv("PATH").value_or(""), ":");
|
||||
unixPath.insert(unixPath.begin(), pathAdditions.begin(), pathAdditions.end());
|
||||
auto unixPathString = dropEmptyInitThenConcatStringsSep(":", unixPath);
|
||||
auto unixPathString = concatStringsSep(":", unixPath);
|
||||
setEnv("PATH", unixPathString.c_str());
|
||||
|
||||
Strings args;
|
||||
|
|
Loading…
Add table
Reference in a new issue