From 6dd36197e871cc3e910181f9ebe6dc2e33403e7e Mon Sep 17 00:00:00 2001 From: Kevin Bost Date: Sun, 16 Feb 2025 22:48:48 -0800 Subject: [PATCH] Fixing issue when there are errors writing the .betaId file --- src/lib-rust/src/locator.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lib-rust/src/locator.rs b/src/lib-rust/src/locator.rs index 2fc0ba53..f5bfe2df 100644 --- a/src/lib-rust/src/locator.rs +++ b/src/lib-rust/src/locator.rs @@ -309,6 +309,11 @@ impl VelopackLocator { } let new_id = Uuid::new_v4(); 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() } }