(command, args = [], options = {})
| 25 | } |
| 26 | |
| 27 | export function runCommandChecked(command, args = [], options = {}) { |
| 28 | const result = runCommand(command, args, options); |
| 29 | if (result.error) { |
| 30 | throw result.error; |
| 31 | } |
| 32 | if (result.status !== 0) { |
| 33 | throw new Error(formatCommandFailure(result)); |
| 34 | } |
| 35 | return result; |
| 36 | } |
| 37 | |
| 38 | export function binaryAvailable(command, versionArgs = ["--version"], options = {}) { |
| 39 | const result = runCommand(command, versionArgs, options); |
no test coverage detected