Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src-tauri/cli/src/bin/dg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -621,9 +621,13 @@ async fn main() {
.get_one::<Url>("url")
.expect("No enrollment URL was provided or it's invalid");
debug!("Successfully parsed enrollment token and URL");
let config = enroll(url, token)
.await
.expect("The enrollment process has failed");
let config = match enroll(url, token).await {
Ok(cfg) => cfg,
Err(err) => {
error!("Enrollment process failed with error: {err}");
return;
}
};
debug!("Successfully enrolled the device, saving the configuration.");
if let Err(err) = config.save(&config_path) {
error!("{err}");
Expand Down