Skip to content

Commit e02320f

Browse files
fix: allow command login to read api url from cli args (#1168)
* fix: allow login to read api url from args * Create strong-phones-smoke.md --------- Co-authored-by: Eric Allam <[email protected]>
1 parent 85a543d commit e02320f

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/strong-phones-smoke.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"trigger.dev": patch
3+
---
4+
5+
fix: allow command login to read api url from cli args

packages/cli-v3/src/commands/login.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export async function login(options?: LoginOptions): Promise<LoginResult> {
7878
if (accessTokenFromEnv) {
7979
const auth = {
8080
accessToken: accessTokenFromEnv,
81-
apiUrl: process.env.TRIGGER_API_URL ?? "https://api.trigger.dev",
81+
apiUrl: process.env.TRIGGER_API_URL ?? opts.defaultApiUrl ?? "https://api.trigger.dev",
8282
};
8383
const apiClient = new CliApiClient(auth.apiUrl, auth.accessToken);
8484
const userData = await apiClient.whoAmI();

0 commit comments

Comments
 (0)