1
0
Fork 0
mirror of https://github.com/jashkenas/coffeescript.git synced 2022-11-09 12:23:24 -05:00

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) ->