cli: nix_add_to_gcroots: don't run in sandboxed tests
This commit is contained in:
@@ -44,6 +44,7 @@ def nix_build(flags: list[str], gcroot: Path | None = None) -> list[str]:
|
|||||||
|
|
||||||
|
|
||||||
def nix_add_to_gcroots(nix_path: Path, dest: Path) -> None:
|
def nix_add_to_gcroots(nix_path: Path, dest: Path) -> None:
|
||||||
|
if not os.environ.get("IN_NIX_SANDBOX"):
|
||||||
cmd = ["nix-store", "--realise", f"{nix_path}", "--add-root", f"{dest}"]
|
cmd = ["nix-store", "--realise", f"{nix_path}", "--add-root", f"{dest}"]
|
||||||
run(cmd)
|
run(cmd)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user