Skip to content

Commit d3c5540

Browse files
committed
feat(run): send unknown cpu_brand when it is not recognized
1 parent 36ac0ba commit d3c5540

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/run/check_system.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,14 @@ impl SystemInfo {
7676
.iter()
7777
.next()
7878
.ok_or(anyhow!("Failed to get CPU info"))?;
79-
let cpu_brand = cpu.brand().to_string();
79+
let cpu_brand = {
80+
let brand = cpu.brand().to_string();
81+
if brand.is_empty() {
82+
"unknown".to_string()
83+
} else {
84+
brand
85+
}
86+
};
8087
let cpu_name = cpu.name().to_string();
8188
let cpu_vendor_id = cpu.vendor_id().to_string();
8289

0 commit comments

Comments
 (0)