try/catch opening the v3 CLI login URL. Fix for Ubuntu

This commit is contained in:
Matt Aitken
2024-07-17 13:15:42 +01:00
parent 27de884f93
commit d6c6dc993d
2 changed files with 9 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"trigger.dev": patch
---
try/catch opening the login URL
+4 -1
View File
@@ -204,7 +204,10 @@ export async function login(options?: LoginOptions): Promise<LoginResult> {
`Please visit the following URL to login:\n${chalkLink(authorizationCodeResult.url)}`
);
await open(authorizationCodeResult.url);
try {
//this can throw an error on Ubuntu
await open(authorizationCodeResult.url);
} catch (e) {}
//poll for personal access token (we need to poll for it)
const getPersonalAccessTokenSpinner = spinner();