(channel: string, version: string, binaryTarget: string)
| 34 | } |
| 35 | |
| 36 | export async function getCacheDir(channel: string, version: string, binaryTarget: string): Promise<string | null> { |
| 37 | const rootCacheDir = await getRootCacheDir() |
| 38 | if (!rootCacheDir) { |
| 39 | return null |
| 40 | } |
| 41 | const cacheDir = path.join(rootCacheDir, channel, version, binaryTarget) |
| 42 | try { |
| 43 | if (!fs.existsSync(cacheDir)) { |
| 44 | await ensureDir(cacheDir) |
| 45 | } |
| 46 | } catch (e) { |
| 47 | debug('The following error is being caught and just there for debugging:') |
| 48 | debug(e) |
| 49 | return null |
| 50 | } |
| 51 | return cacheDir |
| 52 | } |
| 53 | |
| 54 | export function getDownloadUrl({ |
| 55 | channel, |
no test coverage detected