about summary refs log tree commit diff
path: root/src/nix-env
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix-env')
-rw-r--r--src/nix-env/main.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nix-env/main.cc b/src/nix-env/main.cc
index ed00fc206d97..8cbc3b7038ba 100644
--- a/src/nix-env/main.cc
+++ b/src/nix-env/main.cc
@@ -118,7 +118,7 @@ void loadDerivations(EvalState & state, Path nePath, DrvInfos & drvs)
 
 static Path getHomeDir()
 {
-    Path homeDir(getenv("HOME"));
+    Path homeDir(getEnv("HOME", ""));
     if (homeDir == "") throw Error("HOME environment variable not set");
     return homeDir;
 }