mirror of
https://github.com/NixOS/nix.git
synced 2024-11-22 06:42:28 +00:00
local-derivation-goal: Print sandbox error detail on darwin
Co-Authored-By: Théophane Hufschmitt <theophane.hufschmitt@tweag.io>
This commit is contained in:
parent
ae8a38d29c
commit
b429e96583
@ -2137,8 +2137,9 @@ void LocalDerivationGoal::runChild()
|
|||||||
sandboxArgs.push_back("_ALLOW_LOCAL_NETWORKING");
|
sandboxArgs.push_back("_ALLOW_LOCAL_NETWORKING");
|
||||||
sandboxArgs.push_back("1");
|
sandboxArgs.push_back("1");
|
||||||
}
|
}
|
||||||
if (sandbox_init_with_parameters(sandboxProfile.c_str(), 0, stringsToCharPtrs(sandboxArgs).data(), NULL)) {
|
char * sandbox_errbuf = nullptr;
|
||||||
writeFull(STDERR_FILENO, "failed to configure sandbox\n");
|
if (sandbox_init_with_parameters(sandboxProfile.c_str(), 0, stringsToCharPtrs(sandboxArgs).data(), &sandbox_errbuf)) {
|
||||||
|
writeFull(STDERR_FILENO, fmt("failed to configure sandbox: %s\n", sandbox_errbuf ? sandbox_errbuf : "(null)"));
|
||||||
_exit(1);
|
_exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user