(command: string)
| 82 | }; |
| 83 | |
| 84 | export const commandExists = (command: string): boolean => { |
| 85 | try { |
| 86 | execSync(`command -v ${command}`, { stdio: 'ignore' }); |
| 87 | return true; |
| 88 | } catch (error) { |
| 89 | return false; |
| 90 | } |
| 91 | }; |
| 92 | |
| 93 | export const assertCommandExists = (command: string): void => { |
| 94 | if (!commandExists(command)) { |
no outgoing calls
no test coverage detected