Skip to content

Commit

Permalink
Log invalid user input errors before help message
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Del Core committed Sep 20, 2023
1 parent 7888ac5 commit fa37fe1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/yellow-eagles-rescue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@hypermod/cli': patch
---

Correctly report invalid user input errors
2 changes: 1 addition & 1 deletion packages/cli/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ Examples:
}

if (error instanceof InvalidUserInputError) {
console.warn(program.help());
console.warn(chalk.red(error.message));
console.warn(program.help());
process.exit(9);
}

Expand Down

0 comments on commit fa37fe1

Please sign in to comment.