cli: nix_add_to_gcroots: don't run in sandboxed tests

This commit is contained in:
lassulus
2025-02-15 10:12:03 +01:00
committed by clan-bot
parent 14f49512ed
commit 451d865109

View File

@@ -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)