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(cua-driver): expose skill install failure details (#2510)

Francesco Bonaccid614d8db689c
diff --git a/.github/scripts/tests/test_cua_driver_release_wiring.py b/.github/scripts/tests/test_cua_driver_release_wiring.py
index 929cfa5d9e..7914b92819 100644
--- a/.github/scripts/tests/test_cua_driver_release_wiring.py
+++ b/.github/scripts/tests/test_cua_driver_release_wiring.py
@@ -328,6 +328,21 @@ class TestCuaDriverReleaseWiring(unittest.TestCase):
self.assertNotIn("softprops/action-gh-release", workflow)
self.assertNotIn("bake version into install scripts", workflow.lower())
+ skill_installer = self.read(
+ "libs/cua-driver/rust/crates/cua-driver/src/skills.rs"
+ )
+ self.assertIn(
+ "releases/download/cua-driver-rs-v{version}/"
+ "cua-driver-rs-v{version}-skills.tar.gz",
+ skill_installer,
+ )
+ self.assertIn(
+ "raw.githubusercontent.com/trycua/cua/main/"
+ "libs/cua-driver/rust/Skills/cua-driver",
+ skill_installer,
+ )
+ self.assertNotIn("releases/latest", skill_installer)
+
windows_skill = self.read("libs/cua-driver/rust/Skills/cua-driver/WINDOWS.md")
self.assertIn("https://cua.ai/driver/install.ps1", windows_skill)
self.assertNotIn("/releases/latest/download/install.ps1", windows_skill)
diff --git a/libs/cua-driver/rust/crates/cua-driver/src/skills.rs b/libs/cua-driver/rust/crates/cua-driver/src/skills.rs
index db88399dbb..0a4aff5f9f 100644
--- a/libs/cua-driver/rust/crates/cua-driver/src/skills.rs
+++ b/libs/cua-driver/rust/crates/cua-driver/src/skills.rs
@@ -278,7 +278,10 @@ pub fn run(subcommand: &str, flags: &[String]) {
match result {
Ok(()) => {}
Err(e) => {
- eprintln!("cua-driver skills {subcommand}: {e}");
+ // `anyhow::Error`'s default Display only prints the outermost
+ // context. Use alternate Display so failures include the source
+ // URL and the underlying HTTP, extraction, or filesystem error.
+ eprintln!("cua-driver skills {subcommand}: {e:#}");
std::process::exit(1);
}
}