mirror of https://github.com/aminya/setup-cpp
feat: print the supported versions when throwing errors
This commit is contained in:
parent
5c2a3415c5
commit
b4b0e08b92
|
@ -11,6 +11,7 @@ ignorePaths:
|
|||
- "**/node_modules/"
|
||||
words:
|
||||
- aarch
|
||||
- clangd
|
||||
- aminya
|
||||
- applellvm
|
||||
- bazel
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -66,7 +66,7 @@ export const VERSIONS: Set<string> = getVersions([
|
|||
"16.0.1",
|
||||
"16.0.2",
|
||||
"16.0.3",
|
||||
"16.0.4"
|
||||
"16.0.4",
|
||||
])
|
||||
|
||||
/** The LLVM versions that were never released for the Windows platform. */
|
||||
|
@ -96,7 +96,7 @@ const DARWIN_MISSING = new Set([
|
|||
"16.0.1",
|
||||
"16.0.2",
|
||||
"16.0.3",
|
||||
"16.0.4"
|
||||
"16.0.4",
|
||||
])
|
||||
|
||||
/**
|
||||
|
|
|
@ -49,7 +49,11 @@ export async function getSpecificVersionAndUrl(
|
|||
|
||||
// if the given set doesn't include the version, throw an error
|
||||
if (!versions.has(version)) {
|
||||
throw new Error(`Unsupported target! (platform='${platform}', version='${version}')`)
|
||||
throw new Error(
|
||||
`Unsupported target! (platform='${platform}', version='${version}'). Try one of the following: ${JSON.stringify(
|
||||
versions
|
||||
)}`
|
||||
)
|
||||
}
|
||||
|
||||
const offlineUrls: string[] = []
|
||||
|
@ -68,8 +72,8 @@ export async function getSpecificVersionAndUrl(
|
|||
}
|
||||
|
||||
throw new Error(
|
||||
`Unsupported target! (platform='${platform}', version='${version}'). The offline urls tested:\n${offlineUrls.join(
|
||||
"\n"
|
||||
`Unsupported target! (platform='${platform}', version='${version}'). Try one of the following: ${JSON.stringify(
|
||||
versions
|
||||
)}`
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue