From 95f300d3236a3471bcf35c450dfb36d811b103be Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Fri, 29 Jul 2022 17:23:58 +0200 Subject: [PATCH] fix(CLI): throw error on failure in sb init --- code/lib/cli/src/generate.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/code/lib/cli/src/generate.ts b/code/lib/cli/src/generate.ts index c55ba863b596..d94e4517c432 100644 --- a/code/lib/cli/src/generate.ts +++ b/code/lib/cli/src/generate.ts @@ -44,7 +44,12 @@ program .option('-y --yes', 'Answer yes to all prompts') .option('-b --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 ')