diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nix-env/nix-env.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nix-env/nix-env.cc b/src/nix-env/nix-env.cc index b57e54c758f6..68a3e89d8c7e 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) |