Fixing PYTHONPATH in secrets/generate test
This commit is contained in:
parent
cb2815c4d0
commit
be9d3d43bf
@ -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],
|
||||
|
Loading…
Reference in New Issue
Block a user