Skip to content

CLI: --stdio and --map together throw exception #3440

@pyalot

Description

@pyalot

It's often useful in a build process to be able to pipe the output of a command to another program (or to invoke a program as a subprocess that is being piped to/from).

cat foo.coffee | coffee --map --stdio doesn't work and errors out with the following:

TypeError: Cannot call method 'split' of null
  at Object.exports.baseFileName (/root/lib/node_modules/coffee-script/lib/coffee-script/helpers.js:168:18)
  at outputPath (/root/lib/node_modules/coffee-script/lib/coffee-script/command.js:430:24)
  at writeJs (/root/lib/node_modules/coffee-script/lib/coffee-script/command.js:447:21)
  at compileScript (/root/lib/node_modules/coffee-script/lib/coffee-script/command.js:225:18)
  at Socket.<anonymous> (/root/lib/node_modules/coffee-script/lib/coffee-script/command.js:254:14)
  at Socket.EventEmitter.emit (events.js:117:20)
  at _stream_readable.js:920:16
  at process._tickCallback (node.js:415:13)

coffee --print --map foo.coffee doesn't work, instead of the map it compiles and prints the compiled JS

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions