(stream)
| 67 | } |
| 68 | |
| 69 | const setBlocking = (stream) => { |
| 70 | // Copied from https://github.com/yargs/set-blocking |
| 71 | // https://raw.githubusercontent.com/yargs/set-blocking/master/LICENSE.txt |
| 72 | /* istanbul ignore next - we trust that this works */ |
| 73 | if (stream._handle && stream.isTTY && typeof stream._handle.setBlocking === 'function') { |
| 74 | stream._handle.setBlocking(true) |
| 75 | } |
| 76 | return stream |
| 77 | } |
| 78 | |
| 79 | // This is the key that is returned to the user for errors |
| 80 | const ERROR_KEY = 'error' |