Skip to content

Commit

Permalink
feat: exit with non-zero exit code if error
Browse files Browse the repository at this point in the history
  • Loading branch information
paulkim26 committed Sep 30, 2023
1 parent 0790a09 commit 70046c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,4 @@ bun start examples/dir -o output

- Parses a title from the input files. If the first line is followed by two blank lines, a `<h1>` tag will be generated in the HTML.
- Can define a custom output directory with the `--output`/`-o` argument.
- Program will exit with a non-zero exit code in an error occurred.
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import parseArguments from "~/parseArguments";
const args = Bun.argv.slice(2);
try {
await parseArguments(args);
process.exit(0);
} catch (e: any) {
console.error(e.message);
process.exit(1);
}

0 comments on commit 70046c1

Please sign in to comment.