fix: download correct camoufox version on macos x64

This commit is contained in:
zhom
2025-12-21 13:51:58 +04:00
parent 7409cf7851
commit 5cc816ecc5
3 changed files with 129 additions and 12 deletions
+3 -3
View File
@@ -836,11 +836,11 @@ impl ApiClient {
};
// Look for assets matching the pattern: camoufox-{version}-{release}-{os}.{arch}.zip
// Use ends_with for precise matching to avoid false positives
let pattern = format!(".{os_name}.{arch_name}.zip");
assets.iter().any(|asset| {
let name = asset.name.to_lowercase();
name.starts_with("camoufox-")
&& name.contains(&format!("-{os_name}.{arch_name}.zip"))
&& name.ends_with(".zip")
name.starts_with("camoufox-") && name.ends_with(&pattern)
})
}