mirror of https://github.com/aminya/setup-cpp
fix: catch the failure in setupBin
This commit is contained in:
parent
5cffd3930a
commit
21b816c605
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -45,13 +45,17 @@ export async function setupBin(
|
||||||
const { url, binRelativeDir, extractedFolderName, extractFunction } = await getPackageInfo(version, process.platform)
|
const { url, binRelativeDir, extractedFolderName, extractFunction } = await getPackageInfo(version, process.platform)
|
||||||
|
|
||||||
// Restore from cache (if found).
|
// Restore from cache (if found).
|
||||||
const dir = find(name, version)
|
try {
|
||||||
if (dir) {
|
const dir = find(name, version)
|
||||||
info(`${name} ${version} was found in the cache.`)
|
if (dir) {
|
||||||
const installDir = join(dir, extractedFolderName)
|
info(`${name} ${version} was found in the cache.`)
|
||||||
const binDir = join(installDir, binRelativeDir)
|
const installDir = join(dir, extractedFolderName)
|
||||||
addPath(binDir)
|
const binDir = join(installDir, binRelativeDir)
|
||||||
return { installDir, binDir }
|
addPath(binDir)
|
||||||
|
return { installDir, binDir }
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
// fails on a local machine?
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get an unique output directory name from the URL.
|
// Get an unique output directory name from the URL.
|
||||||
|
|
Loading…
Reference in New Issue