Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

fix(cli): use shutil.which for ffmpeg detection in skills record (#1338)

ddupont67f26caf8c74
diff --git a/libs/python/cua-cli/cua_cli/commands/skills.py b/libs/python/cua-cli/cua_cli/commands/skills.py
index 26e015360c..f7dbc424fe 100644
--- a/libs/python/cua-cli/cua_cli/commands/skills.py
+++ b/libs/python/cua-cli/cua_cli/commands/skills.py
@@ -418,13 +418,7 @@ def cmd_record(args: argparse.Namespace) -> int:
def _check_ffmpeg() -> bool:
"""Check if ffmpeg is available."""
- import subprocess
-
- try:
- result = subprocess.run(["which", "ffmpeg"], capture_output=True)
- return result.returncode == 0
- except Exception:
- return False
+ return shutil.which("ffmpeg") is not None
async def _record_skill_async(args: argparse.Namespace) -> int: