fix(cli): update command name based on availability of viu-media

This commit is contained in:
benexl
2025-12-16 17:57:18 +03:00
parent dbbfe0331b
commit 20ce2f6ca3

View File

@@ -1,4 +1,5 @@
import logging
import shutil
import sys
from typing import TYPE_CHECKING
@@ -188,7 +189,8 @@ You can disable this message by turning off the welcome_screen option in the con
):
import subprocess
cmd = ["viu", "config", "--update"]
_cli_cmd_name="viu" if not shutil.which("viu-media") else "viu-media"
cmd = [_cli_cmd_name, "config", "--update"]
print(f"running '{' '.join(cmd)}'...")
subprocess.run(cmd)