Skip to content

Commit

Permalink
only warn when not able to open browser url
Browse files Browse the repository at this point in the history
  • Loading branch information
matcool committed Nov 16, 2024
1 parent 5209328 commit 27e96c4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/index_auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ pub fn login(config: &mut Config, token: Option<String>) {
info!("Go to: {} and enter the login code", &login_data.uri);
info!("Your login code is: {}", &login_data.code);
copy_token(&login_data.code);
open::that(&login_data.uri).nice_unwrap("Unable to open browser");
if let Err(msg) = open::that(&login_data.uri) {
warn!("Unable to open browser: {}", msg);
warn!("Go to the URL manually: {}", &login_data.uri);
}

loop {
info!("Checking login status");
Expand Down

0 comments on commit 27e96c4

Please sign in to comment.