(command: string)
| 38 | }) |
| 39 | |
| 40 | async function isCommandAvailable(command: string): Promise<boolean> { |
| 41 | try { |
| 42 | // which does not execute the file. |
| 43 | return !!(await which(command)) |
| 44 | } catch { |
| 45 | return false |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | const detectPackageManagers = memoize(async (): Promise<string[]> => { |
| 50 | const packageManagers = [] |