Fix when setting the url as an option

This commit is contained in:
Matt Aitken
2023-07-10 10:32:07 +01:00
parent 38614ee526
commit 568786e4f6
3 changed files with 12 additions and 7 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"@trigger.dev/cli": patch
---
Fix when setting the url as an option
+2 -2
View File
@@ -32,7 +32,7 @@
"type": "module",
"exports": "./dist/index.js",
"bin": {
"cli": "./dist/index.js"
"trigger-cli": "./dist/index.js"
},
"devDependencies": {
"@types/fs-extra": "^11.0.1",
@@ -76,4 +76,4 @@
"engines": {
"node": ">=18"
}
}
}
+5 -5
View File
@@ -187,12 +187,12 @@ const resolveOptionsWithPrompts = async (
try {
if (!options.triggerUrl) {
resolvedOptions.triggerUrl = await promptTriggerUrl();
}
if (resolvedOptions.triggerUrl === CLOUD_TRIGGER_URL) {
resolvedOptions.apiUrl = CLOUD_API_URL;
} else {
resolvedOptions.apiUrl = resolvedOptions.triggerUrl;
}
if (resolvedOptions.triggerUrl === CLOUD_TRIGGER_URL) {
resolvedOptions.apiUrl = CLOUD_API_URL;
} else {
resolvedOptions.apiUrl = resolvedOptions.triggerUrl;
}
if (!options.apiKey) {