(command: string)
| 29 | }) |
| 30 | |
| 31 | async function isCommandAvailable(command: string): Promise<boolean> { |
| 32 | try { |
| 33 | // which does not execute the file. |
| 34 | return !!(await which(command)) |
| 35 | } catch { |
| 36 | return false |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | const detectPackageManagers = memoize(async (): Promise<string[]> => { |
| 41 | const packageManagers = [] |