aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nix-env/nix-env.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nix-env/nix-env.cc b/src/nix-env/nix-env.cc
index b57e54c75..68a3e89d8 100644
--- a/src/nix-env/nix-env.cc
+++ b/src/nix-env/nix-env.cc
@@ -1350,6 +1350,9 @@ void run(Strings args)
if (!op) throw UsageError("no operation specified");
+ if (globals.profile == "")
+ globals.profile = getEnv("NIX_PROFILE", "");
+
if (globals.profile == "") {
Path profileLink = getHomeDir() + "/.nix-profile";
globals.profile = pathExists(profileLink)