diff options
Diffstat (limited to 'src/nix/command.cc')
-rw-r--r-- | src/nix/command.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nix/command.cc b/src/nix/command.cc index de761166b..2da5736e7 100644 --- a/src/nix/command.cc +++ b/src/nix/command.cc @@ -4,6 +4,8 @@ #include "nixexpr.hh" #include "profiles.hh" +extern char * * environ; + namespace nix { Commands * RegisterCommand::commands = nullptr; @@ -175,6 +177,7 @@ void MixEnvironment::setEnviron() { auto val = getenv(var.c_str()); if (val) stringsEnv.emplace_back(fmt("%s=%s", var.c_str(), val)); } + vectorEnv = stringsToCharPtrs(stringsEnv); environ = vectorEnv.data(); } else { |