* Executes the provided command, piping the parent process' stderr, updating * the error to process if stderr is not empty, and returns process object. * @param {string} cmd * @return {!Object}
(cmd)
| 57 | * @return {!Object} |
| 58 | */ |
| 59 | function execWithError(cmd) { |
| 60 | const p = exec(cmd, {'stdio': ['inherit', 'inherit', 'pipe']}); |
| 61 | if (p.stderr.length > 0) { |
| 62 | p.error = new Error(p.stderr.toString()); |
| 63 | } |
| 64 | return p; |
| 65 | } |
| 66 | |
| 67 | /** |
| 68 | * Executes the provided command, piping the parent process' stderr, throwing |