This commit is contained in:
lbl8603
2024-07-06 16:44:30 +08:00
parent 367a56d346
commit 29cd111a49
+3 -2
View File
@@ -56,7 +56,8 @@ pub fn get_unique_identifier() -> Option<String> {
if let Ok(output) = Command::new("dmidecode")
.arg("-s")
.arg("system-uuid")
.output() {
.output()
{
let identifier = String::from_utf8_lossy(&output.stdout).trim().to_owned();
if !identifier.is_empty() {
return Some(identifier.to_string());
@@ -74,4 +75,4 @@ pub fn get_unique_identifier() -> Option<String> {
}
None
}
}