File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -13,9 +13,6 @@ pub enum Error {
13
13
#[ error( "HTTP server error: {0}" ) ]
14
14
Http ( std:: io:: Error ) ,
15
15
16
- #[ error( "failed to open browser: {0}" ) ]
17
- WebBrowser ( std:: io:: Error ) ,
18
-
19
16
#[ error( "failed to load context: {0}" ) ]
20
17
Context ( #[ from] workos:: ContextLoadError ) ,
21
18
@@ -167,7 +164,10 @@ pub async fn login(context: &AuthContext, options: LoginOptions<'_>) -> Result<(
167
164
if options. open_browser {
168
165
p. println ( "Opening login page in your browser." ) ;
169
166
p. println ( "Once you've logged in, the process will continue here." ) ;
170
- webbrowser:: open ( & login_url) . map_err ( Error :: WebBrowser ) ?;
167
+ p. println ( format ! (
168
+ "Alternatively, manually open this url: {login_url}"
169
+ ) ) ;
170
+ webbrowser:: open ( & login_url) . ok ( ) ; // Ok to ignore error here. The user can just open the above url themselves.
171
171
} else {
172
172
p. println ( "Open the following page in your browser:" ) ;
173
173
p. println ( & login_url) ;
You can’t perform that action at this time.
0 commit comments