(appName: string)
| 22 | } |
| 23 | |
| 24 | async function checkMacosApp(appName: string) { |
| 25 | const locations = [`/Applications/${appName}.app`, `/System/Applications/${appName}.app`] |
| 26 | |
| 27 | const home = process.env.HOME |
| 28 | if (home) locations.push(`${home}/Applications/${appName}.app`) |
| 29 | |
| 30 | for (const location of locations) { |
| 31 | if (await exists(location)) return true |
| 32 | } |
| 33 | |
| 34 | return execFilePromise("which", [appName]) |
| 35 | .then(() => true) |
| 36 | .catch(() => false) |
| 37 | } |
| 38 | |
| 39 | async function resolveWindowsAppPath(appName: string): Promise<string | null> { |
| 40 | let output: string |
no test coverage detected