mirror of
https://github.com/NixOS/nix
synced 2025-06-24 22:11:15 +02:00
nix develop: use proper permissions for $TMPDIR
Before this change, unsandboxed builds that tried to use `passAsFile` would fail when run within a devshell.
This commit is contained in:
parent
7918adbb62
commit
faed13673b
1 changed files with 1 additions and 1 deletions
|
@ -298,7 +298,7 @@ struct Common : InstallableCommand, MixProfile
|
|||
for (auto & var : savedVars)
|
||||
out << fmt("%s=\"$%s:$nix_saved_%s\"\n", var, var, var);
|
||||
|
||||
out << "export NIX_BUILD_TOP=\"$(mktemp -d -t nix-shell.XXXXXX)\"\n";
|
||||
out << "export NIX_BUILD_TOP=\"$(mktemp -d -t nix-shell.XXXXXX)\"\nchmod 1777 \"$NIX_BUILD_TOP\"\n";
|
||||
for (auto & i : {"TMP", "TMPDIR", "TEMP", "TEMPDIR"})
|
||||
out << fmt("export %s=\"$NIX_BUILD_TOP\"\n", i);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue