Skip to content

Commit 1c31d98

Browse files
committed
Add changeset
1 parent b223a5e commit 1c31d98

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.changeset/warm-eagles-itch.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+
Fixed misleading error message in the CLI when config file is missing ("maxDuration" is now required). A useful error message is now shown, including a hint about the `--config` flag.

packages/cli-v3/src/config.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ async function resolveConfig(
167167
const missingConfigFile = !result.configFile || result.configFile === "trigger.config";
168168

169169
if (missingConfigFile) {
170-
const err = new OutroCommandError(
170+
throw new OutroCommandError(
171171
[
172172
"Couldn't find your trigger.config.ts file.",
173173
"",
@@ -176,8 +176,6 @@ async function resolveConfig(
176176
"Alternatively, you can initialize a new project using `npx trigger.dev@latest init`.",
177177
].join("\n")
178178
);
179-
err.stack = undefined;
180-
throw err;
181179
}
182180

183181
const config =

0 commit comments

Comments
 (0)