Skip to content

Commit

Permalink
fix: improve error show for bumpp (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
northword authored Feb 11, 2025
1 parent da84808 commit 29f513b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/scaffold/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ async function main() {
// globalOpts = cli.optsWithGlobals();
}

export default async function run() {
export default async function mainWithErrorHandler() {
main()
.then(() => {
checkGitIgnore();
Expand All @@ -115,5 +115,11 @@ export default async function run() {

function onError(err: Error) {
logger.error(err);
// For tinyexec - bumpp
// @ts-expect-error tinyexec's NonZeroExitError has output.stderr
if (err.output) {
// @ts-expect-error tinyexec's NonZeroExitError has output.stderr
logger.log(err.output.stderr);
}
process.exit(1);
}

0 comments on commit 29f513b

Please sign in to comment.