fix impure tests

This commit is contained in:
lassulus
2023-09-21 17:17:48 +02:00
parent 56bcd0cf0b
commit 17520e2553
7 changed files with 44 additions and 53 deletions

View File

@@ -1,8 +1,9 @@
import argparse
import json
import os
import subprocess
from ..dirs import get_clan_flake_toplevel
from ..dirs import get_clan_flake_toplevel, module_root
from ..errors import ClanError
from ..nix import nix_build, nix_config, nix_eval
@@ -22,6 +23,9 @@ def upload_secrets(machine: str) -> None:
text=True,
check=True,
)
env = os.environ.copy()
env["PYTHONPATH"] = str(module_root().parent) # TODO do this in the clanCore module
host = json.loads(
subprocess.run(
nix_eval(
@@ -41,6 +45,7 @@ def upload_secrets(machine: str) -> None:
secret_upload_script,
host,
],
env=env,
)
if secret_upload.returncode != 0: