Skip to content

Commit 94b0195

Browse files
Vyacheslav Panchenkovalorkin
authored andcommitted
fix(command): add exit for regular build, watch as is (#18)
1 parent ccda017 commit 94b0195

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/commands/build.command.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,12 @@ export function buildCommand({project, verbose, clean, local, main, watch, skipB
8686
task: () => new Listr(
8787
opts.map(opt => ({
8888
title: `Building ${opt.pkg.name} (${opt.src})`,
89-
task: () => build(opt.tmp)
89+
task: () => watch ?
90+
build(opt.tmp) :
91+
build(opt.tmp).catch(error => {
92+
console.log(error.toString());
93+
process.exit(1);
94+
})
9095
}))
9196
)
9297
},

0 commit comments

Comments
 (0)