(command)
| 40 | } |
| 41 | |
| 42 | function ensureCommand(command) { |
| 43 | const result = spawnSync(command, ['--version'], { |
| 44 | encoding: 'utf8', |
| 45 | stdio: 'pipe', |
| 46 | shell: process.platform === 'win32' |
| 47 | }); |
| 48 | |
| 49 | if (result.status !== 0) { |
| 50 | throw new Error(`${command} is required but was not found in PATH.`); |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | function createTimestamp() { |
| 55 | const now = new Date(); |