diff options
Diffstat (limited to 'third_party/nix/src/nix/run.cc')
-rw-r--r-- | third_party/nix/src/nix/run.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/third_party/nix/src/nix/run.cc b/third_party/nix/src/nix/run.cc index 241e0a2d7855..e76f8834cfc8 100644 --- a/third_party/nix/src/nix/run.cc +++ b/third_party/nix/src/nix/run.cc @@ -123,7 +123,8 @@ struct CmdRun final : InstallablesCommand { todo.push(path); } - Strings unixPath = absl::StrSplit(getEnv("PATH"), absl::ByChar(':')); + Strings unixPath = + absl::StrSplit(getEnv("PATH"), absl::ByChar(':'), absl::SkipEmpty()); while (!todo.empty()) { Path path = todo.front(); @@ -137,7 +138,8 @@ struct CmdRun final : InstallablesCommand { auto propPath = path + "/nix-support/propagated-user-env-packages"; if (accessor->stat(propPath).type == FSAccessor::tRegular) { for (auto p : - absl::StrSplit(readFile(propPath), absl::ByAnyChar(" \t\n\r"))) { + absl::StrSplit(readFile(propPath), absl::ByAnyChar(" \t\n\r"), + absl::SkipEmpty())) { todo.push(std::string(p)); } } |