aboutsummaryrefslogtreecommitdiff
path: root/src/nix/run.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix/run.cc')
-rw-r--r--src/nix/run.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nix/run.cc b/src/nix/run.cc
index 0fbd0b8a8..2865f5bbb 100644
--- a/src/nix/run.cc
+++ b/src/nix/run.cc
@@ -115,7 +115,7 @@ struct CmdRun : InstallablesCommand, RunCommon, MixEnvironment
setEnviron();
- auto unixPath = tokenizeString<Strings>(getEnv("PATH"), ":");
+ auto unixPath = tokenizeString<Strings>(getEnv("PATH").value_or(""), ":");
while (!todo.empty()) {
Path path = todo.front();