From f6e4862a6f7bf3a7520e56a1a2c1e67c526c1000 Mon Sep 17 00:00:00 2001 From: Nose Date: Wed, 21 Jan 2026 23:37:47 -0800 Subject: [PATCH] f --- scripts/bootstrap.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/scripts/bootstrap.py b/scripts/bootstrap.py index 9593e60..bb3528c 100644 --- a/scripts/bootstrap.py +++ b/scripts/bootstrap.py @@ -1003,6 +1003,7 @@ def main() -> int: if (sys.stdin.isatty() or sys.stdout.isatty() or script_path is None) and not args.quiet: sel = _interactive_menu() if sel == "install": + # Force the prompt regardless of current environment detection if not _ensure_repo_available(): return 1 args.skip_deps = False @@ -1222,6 +1223,35 @@ def main() -> int: # 7. CLI Verification pb.update("Verifying CLI configuration...") + # Check core dependencies (including mpv) before finalizing + try: + missing = [] + for mod in ["importlib", "shutil", "subprocess", "mpv"]: + try: + subprocess.run( + [str(venv_python), "-c", f"import {mod}"], + stdout=subprocess.DEVNULL, + stderr=subprocess.DEVNULL, + check=True + ) + except Exception: + missing.append(mod) + + if missing: + # If mpv is missing, it might be because python-mpv wasn't in requirements.txt + # or failed to install. Try installing it explicitly. + if "mpv" in missing: + try: + _run_cmd([str(venv_python), "-m", "pip", "install", "--no-cache-dir", "python-mpv"]) + missing.remove("mpv") + except Exception: + pass + + if missing: + print(f"\nWarning: The following packages were not importable in the venv: {', '.join(missing)}") + except Exception: + pass + try: cli_verify_result = subprocess.run( [