Fix #3440: --stdio and --map don’t make sense to use together (#4721)

This commit is contained in:
Geoffrey Booth
2017-09-27 00:02:30 -07:00
committed by GitHub
parent 0b0a9ef2c4
commit 08e00331dd
2 changed files with 7 additions and 0 deletions

View File

@@ -303,6 +303,10 @@
// and write them back to **stdout**.
compileStdio = function() {
var buffers, stdin;
if (opts.map) {
console.error('--stdio and --map cannot be used together');
process.exit(1);
}
buffers = [];
stdin = process.openStdin();
stdin.on('data', function(buffer) {

View File

@@ -243,6 +243,9 @@ compileScript = (file, input, base = null) ->
# Attach the appropriate listeners to compile scripts incoming over **stdin**,
# and write them back to **stdout**.
compileStdio = ->
if opts.map
console.error '--stdio and --map cannot be used together'
process.exit 1
buffers = []
stdin = process.openStdin()
stdin.on 'data', (buffer) ->