Commit Graph

6 Commits

Author SHA1 Message Date
Steven Edouard
fd83e399fe Launch processes in a Windows-friendly way
- options.cwd passed through convertToOSPath
- launch processes on Windows using child_process.exec
- parse args for windows into space-delimited string
2016-01-25 15:02:02 -08:00
Martijn Walraven
b274e5390a Fix bug in execFileAsync that meant options were ignored without args 2015-09-11 18:44:17 +02:00
Martijn Walraven
b2c5ff4d5a Allow specifying a destination option for execFileSync/Async
If specified, instead of capturing the output, the child process stdout
will be piped to the destination stream.

Although the standard spawn stdio option lets you pass in streams,
these have to be connected to an open file descriptor. The destination
option allows you to use any Writable, so it can be used with a
Transform for instance.
2015-08-26 19:26:55 +02:00
Martijn Walraven
63461fcd8f Remove unused RunCommand and add promise-based execFileSync/Async
The execFileSync function is meant to resemble the similarly-named Node
0.12 synchronous process creation API, but instead of being fully
blocking it uses a promise-based implementation. You can also use
execFileAsync directly, which returns a promise.

Some functionality is currently missing but could be added when the
need arises (e.g. support for timeout, maxBuffer, and encoding options).

Eventually, these versions should replace the ones in
tools/utils/utils.js and tools/tool-testing/selftest.js.
2015-08-26 19:26:54 +02:00
Slava Kim
39d8aef3d9 move files into console/ tool-testing/ 2015-08-06 16:39:00 -07:00
Slava Kim
8a8db83d29 Move files into tools/utils 2015-08-03 20:32:38 -07:00