Skip to content

Commit

Permalink
Merge pull request #23 from mhanberg/mh/exit-on-stdin-closing
Browse files Browse the repository at this point in the history
Exit when stdin closes
  • Loading branch information
bcomnes committed Aug 9, 2021
2 parents 7fb869b + 20ff669 commit ae1f9b7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bin/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ module.exports = function main(source, outDir, args) {
}

if (args.watch) {
process.stdin.on('end', () => process.exit(0))
process.stdin.resume()

if (options.initialCopy) {
log()
log(`Copy: ${source} --> ${outDir}`)
Expand Down

0 comments on commit ae1f9b7

Please sign in to comment.