pmuellr/wr — Issue #6: use spawn instead of exec to run commands
Author: pmuellr
Created: 2012-01-10 15:12:08+00:00
State: open

Currently, wr uses child_process.exec() to run commands. Unfortunately, this buffers the output - not friendly. child_process.spawn(), on the other hand, does not buffer the output.

The default should probably be to use spawn(). This will require parsing the cmd, presumably by whitespace tokens, destroying any potential quoting you might have done in your command. But commands should be "simple" anyway, right? :-)

So, default to parse command and use spawn, with a command-line option to use exec() instead.