Skip to content

Commit 4b2421b

Browse files
committed
User-friendly error message when --watch and writing to STDOUT
Fixes #156
1 parent cc3f696 commit 4b2421b

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ if (argv.config) argv.config = path.resolve(argv.config)
5050

5151
Promise.resolve()
5252
.then(() => {
53+
if (argv.watch && !(argv.output || argv.replace || argv.dir)) {
54+
error('Cannot write to stdout in watch mode')
55+
}
5356
if (input && input.length) return globber(input)
5457

5558
if (argv.replace || argv.dir) {

0 commit comments

Comments
 (0)