f
This commit is contained in:
@@ -1003,6 +1003,7 @@ def main() -> int:
|
|||||||
if (sys.stdin.isatty() or sys.stdout.isatty() or script_path is None) and not args.quiet:
|
if (sys.stdin.isatty() or sys.stdout.isatty() or script_path is None) and not args.quiet:
|
||||||
sel = _interactive_menu()
|
sel = _interactive_menu()
|
||||||
if sel == "install":
|
if sel == "install":
|
||||||
|
# Force the prompt regardless of current environment detection
|
||||||
if not _ensure_repo_available():
|
if not _ensure_repo_available():
|
||||||
return 1
|
return 1
|
||||||
args.skip_deps = False
|
args.skip_deps = False
|
||||||
@@ -1222,6 +1223,35 @@ def main() -> int:
|
|||||||
|
|
||||||
# 7. CLI Verification
|
# 7. CLI Verification
|
||||||
pb.update("Verifying CLI configuration...")
|
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:
|
try:
|
||||||
cli_verify_result = subprocess.run(
|
cli_verify_result = subprocess.run(
|
||||||
[
|
[
|
||||||
|
|||||||
Reference in New Issue
Block a user