Skip to content

Commit 3143642

Browse files
committedSep 28, 2021
Actually exit when writing to stdout in watch mode
1 parent 49db822 commit 3143642

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎index.js

+2
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ buildCliConfig()
7575
.then(() => {
7676
if (argv.watch && !(argv.output || argv.replace || argv.dir)) {
7777
error('Cannot write to stdout in watch mode')
78+
// Need to explicitly exit here, since error() doesn't exit in watch mode
79+
process.exit(1)
7880
}
7981

8082
if (input && input.length) {

0 commit comments

Comments
 (0)
Please sign in to comment.