feature
This commit is contained in:
+15
-1
@@ -87,6 +87,20 @@ def pick_channel(explicit: str | None, web_root: Path) -> str:
|
||||
return channel
|
||||
|
||||
|
||||
def resolve_python() -> str:
|
||||
"""PHP/panel often launches `python3` such that sys.executable is ''."""
|
||||
exe = (sys.executable or "").strip()
|
||||
if exe:
|
||||
return exe
|
||||
for name in ("python3", "python"):
|
||||
found = shutil.which(name)
|
||||
if found:
|
||||
return found
|
||||
raise SystemExit(
|
||||
"cannot locate python interpreter (sys.executable is empty; install python3 on PATH)"
|
||||
)
|
||||
|
||||
|
||||
def run(cmd: list[str]) -> None:
|
||||
print("+", " ".join(cmd), flush=True)
|
||||
subprocess.run(cmd, cwd=str(LAB_ROOT), check=True)
|
||||
@@ -230,7 +244,7 @@ def main() -> int:
|
||||
for item in fixed_rep:
|
||||
domain_args += ["--reporting-domains", item]
|
||||
|
||||
py = sys.executable
|
||||
py = resolve_python()
|
||||
|
||||
if same_domains:
|
||||
dep = args.deployment_seed or prev_seeds.get("deployment_seed")
|
||||
|
||||
Reference in New Issue
Block a user