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 d5e391ecc8
commit 0c7173afd0

View File

@@ -44,8 +44,9 @@ def nix_build(flags: list[str], gcroot: Path | None = None) -> list[str]:
def nix_add_to_gcroots(nix_path: Path, dest: Path) -> None:
cmd = ["nix-store", "--realise", f"{nix_path}", "--add-root", f"{dest}"]
run(cmd)
if not os.environ.get("IN_NIX_SANDBOX"):
cmd = ["nix-store", "--realise", f"{nix_path}", "--add-root", f"{dest}"]
run(cmd)
def nix_config() -> dict[str, Any]: