Skip to content
Snippets Groups Projects
Unverified Commit 7d4a7136 authored by Eelco Dolstra's avatar Eelco Dolstra
Browse files

More macOS build fixes

parent fabde432
No related branches found
No related tags found
No related merge requests found
...@@ -16,6 +16,8 @@ using namespace nix; ...@@ -16,6 +16,8 @@ using namespace nix;
std::string chrootHelperName = "__run_in_chroot"; std::string chrootHelperName = "__run_in_chroot";
extern char * * environ;
struct CmdRun : InstallablesCommand struct CmdRun : InstallablesCommand
{ {
Strings command = { "bash" }; Strings command = { "bash" };
...@@ -85,7 +87,7 @@ struct CmdRun : InstallablesCommand ...@@ -85,7 +87,7 @@ struct CmdRun : InstallablesCommand
if (s) kept[var] = s; if (s) kept[var] = s;
} }
clearenv(); environ = nullptr;
for (auto & var : kept) for (auto & var : kept)
setenv(var.first.c_str(), var.second.c_str(), 1); setenv(var.first.c_str(), var.second.c_str(), 1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment