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 <eallam@icloud.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"trigger.dev": patch
|
||||
---
|
||||
|
||||
fix: allow command login to read api url from cli args
|
||||
@@ -78,7 +78,7 @@ export async function login(options?: LoginOptions): Promise<LoginResult> {
|
||||
if (accessTokenFromEnv) {
|
||||
const auth = {
|
||||
accessToken: accessTokenFromEnv,
|
||||
apiUrl: process.env.TRIGGER_API_URL ?? "https://api.trigger.dev",
|
||||
apiUrl: process.env.TRIGGER_API_URL ?? opts.defaultApiUrl ?? "https://api.trigger.dev",
|
||||
};
|
||||
const apiClient = new CliApiClient(auth.apiUrl, auth.accessToken);
|
||||
const userData = await apiClient.whoAmI();
|
||||
|
||||
Reference in New Issue
Block a user