mirror of https://github.com/aminya/setup-cpp
fix: catch download errors
This commit is contained in:
parent
c1478378fa
commit
d3d6f6195e
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -289,6 +289,7 @@ All the available tools:
|
||||||
--meson
|
--meson
|
||||||
--conan
|
--conan
|
||||||
--make
|
--make
|
||||||
|
--task
|
||||||
--ccache
|
--ccache
|
||||||
--cppcheck
|
--cppcheck
|
||||||
--clangformat
|
--clangformat
|
||||||
|
|
|
@ -87,8 +87,12 @@ export async function setupBin(
|
||||||
await setupAptPack("xz-utils")
|
await setupAptPack("xz-utils")
|
||||||
}
|
}
|
||||||
|
|
||||||
const downloaded = await downloadTool(url)
|
try {
|
||||||
await extractFunction?.(downloaded, setupDir)
|
const downloaded = await downloadTool(url)
|
||||||
|
await extractFunction?.(downloaded, setupDir)
|
||||||
|
} catch (err) {
|
||||||
|
throw new Error(`Failed to download ${name} ${version} ${arch}: ${err}`)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Adding the bin dir to the path
|
// Adding the bin dir to the path
|
||||||
|
|
Loading…
Reference in New Issue