Fixing issue when there are errors writing the .betaId file

This commit is contained in:
Kevin Bost
2025-02-16 22:48:48 -08:00
committed by Caelan
parent a68ef61111
commit 6dd36197e8

View File

@@ -309,6 +309,11 @@ impl VelopackLocator {
} }
let new_id = Uuid::new_v4(); let new_id = Uuid::new_v4();
std::fs::write(&beta_id_path, &new_id).expect("Unable to write .betaId file"); std::fs::write(&beta_id_path, &new_id).expect("Unable to write .betaId file");
if let Err(_e) = std::fs::write(&beta_id_path, &new_id) {
warn!("Couldn't write out staging userId.");
} else {
info!("Generated new staging userId: {}", new_id.to_string());
}
new_id.to_string() new_id.to_string()
} }
} }