Skip to content

Commit 7d4a713

Browse files
committed
More macOS build fixes
1 parent fabde43 commit 7d4a713

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/nix/run.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ using namespace nix;
1616

1717
std::string chrootHelperName = "__run_in_chroot";
1818

19+
extern char * * environ;
20+
1921
struct CmdRun : InstallablesCommand
2022
{
2123
Strings command = { "bash" };
@@ -85,7 +87,7 @@ struct CmdRun : InstallablesCommand
8587
if (s) kept[var] = s;
8688
}
8789

88-
clearenv();
90+
environ = nullptr;
8991

9092
for (auto & var : kept)
9193
setenv(var.first.c_str(), var.second.c_str(), 1);

0 commit comments

Comments
 (0)