Skip to content

Commit

Permalink
Merge pull request #18816 from storybookjs/fix/sb-init-uncaught-excep…
Browse files Browse the repository at this point in the history
…tion

fix(CLI): throw error on failure in sb init
  • Loading branch information
tmeasday committed Jul 31, 2022
2 parents 1dd3fcd + 95f300d commit 0180f5b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion code/lib/cli/src/generate.ts
Expand Up @@ -44,7 +44,12 @@ program
.option('-y --yes', 'Answer yes to all prompts')
.option('-b --builder <builder>', 'Builder library')
.option('-l --linkable', 'Prepare installation for link (contributor helper)')
.action((options) => initiate(options, pkg));
.action((options) =>
initiate(options, pkg).catch((err) => {
logger.error(err);
process.exit(1);
})
);

program
.command('add <addon>')
Expand Down

0 comments on commit 0180f5b

Please sign in to comment.