Fixing PYTHONPATH in secrets/generate test
Some checks failed
checks-impure / test (pull_request) Failing after 12s
checks / test (pull_request) Failing after 1m23s

This commit is contained in:
Luis Hebendanz 2023-10-03 15:01:13 +02:00
parent cb2815c4d0
commit be9d3d43bf

View File

@ -3,6 +3,7 @@ import logging
import os
import shlex
import subprocess
import sys
from pathlib import Path
from clan_cli.errors import ClanError
@ -34,7 +35,8 @@ def build_generate_script(machine: str, clan_dir: Path) -> str:
def run_generate_secrets(secret_generator_script: str, clan_dir: Path) -> None:
env = os.environ.copy()
env["CLAN_DIR"] = str(clan_dir)
env["PYTHONPATH"] = str(module_root().parent) # TODO do this in the clanCore module
env["PYTHONPATH"] = ":".join(sys.path) # TODO do this in the clanCore module
print(f"generating secrets... {secret_generator_script}")
proc = subprocess.run(
[secret_generator_script],