Skip to content

Commit fa37fe1

Browse files
author
Daniel Del Core
committed
Log invalid user input errors before help message
1 parent 7888ac5 commit fa37fe1

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/yellow-eagles-rescue.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@hypermod/cli': patch
3+
---
4+
5+
Correctly report invalid user input errors

packages/cli/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,8 @@ Examples:
169169
}
170170

171171
if (error instanceof InvalidUserInputError) {
172-
console.warn(program.help());
173172
console.warn(chalk.red(error.message));
173+
console.warn(program.help());
174174
process.exit(9);
175175
}
176176

0 commit comments

Comments
 (0)