This commit is contained in:
2026-01-19 06:24:09 -08:00
parent a961ac3ce7
commit 7ddf0065d1
45 changed files with 627 additions and 411 deletions

View File

@@ -55,11 +55,13 @@ from __future__ import annotations
import argparse
import os
import platform
import re
from pathlib import Path
import shutil
import subprocess
import sys
import time
from typing import Optional
def run(cmd: list[str], quiet: bool = False, debug: bool = False, cwd: Optional[Path] = None) -> None:
@@ -1088,7 +1090,7 @@ def main() -> int:
# 7. CLI Verification
pb.update("Verifying CLI configuration...")
try:
rc = subprocess.run(
cli_verify_result = subprocess.run(
[
str(venv_python),
"-c",
@@ -1098,7 +1100,7 @@ def main() -> int:
stderr=subprocess.DEVNULL,
check=False,
)
if rc.returncode != 0:
if cli_verify_result.returncode != 0:
cmd = [
str(venv_python),
"-c",
@@ -1335,7 +1337,7 @@ if (Test-Path (Join-Path $repo 'CLI.py')) {
else:
# POSIX
# If running as root (id 0), prefer /usr/bin or /usr/local/bin which are standard on PATH
if os.getuid() == 0:
if hasattr(os, "getuid") and os.getuid() == 0:
user_bin = Path("/usr/local/bin")
if not os.access(user_bin, os.W_OK):
user_bin = Path("/usr/bin")