(command)
| 957 | } |
| 958 | |
| 959 | async function commandExists(command) { |
| 960 | const lookupCommand = process.platform === 'win32' ? 'where.exe' : 'which' |
| 961 | return await new Promise(resolvePromise => { |
| 962 | const child = spawn(lookupCommand, [command], { |
| 963 | stdio: 'ignore', |
| 964 | }) |
| 965 | |
| 966 | child.once('error', () => resolvePromise(false)) |
| 967 | child.once('exit', code => resolvePromise(code === 0)) |
| 968 | }) |
| 969 | } |
| 970 | |
| 971 | async function pathType(path) { |
| 972 | try { |
no outgoing calls
no test coverage detected