Financial-Times/origami-build-tools — pull request #30 by samgiles (2014-06-17 13:01:44+00:00)
Title: Fixes stdin redirection issues within the command-line module. 

Previously the callback passed into `command-line.run` would receive the argument list:
`stderr, stdout`, however, these were not populated by the command-line module correctly
as `stdio` was always set to 'inherit' in the `spawn` function call.

This meant that the `error` argument of the callback would always be a _falsey_
empty string; the `stdout` stream from `sass --version` was being sent directly to the real 'stdout' and therefore could not be read and checked. The result of this was that the sass gem was always downloaded
and an installation attempted each time `origami install` was run regardless of any current installation.

This alters the command-line module's API slightly adding an optional `option` argument for controlling stderr and stdout (which takes the same arguments as the [Node API for spawning child processes](http://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options).

We should be able to avoid using `proc.spawn` and the often required associated stream handling for simple cases, and instead use this module with a little more flexibility.

Specifically this makes it easier to reuse the command-line module to run the linting tools described in issue #28.