mirror of
https://github.com/github/codeql-action.git
synced 2026-01-03 21:20:09 +08:00
Improve error categorizations
This commit is contained in:
@@ -418,7 +418,7 @@ export async function setupCodeQL(
|
||||
if (process.platform === "win32") {
|
||||
codeqlCmd += ".exe";
|
||||
} else if (process.platform !== "linux" && process.platform !== "darwin") {
|
||||
throw new Error(`Unsupported platform: ${process.platform}`);
|
||||
throw new util.UserError(`Unsupported platform: ${process.platform}`);
|
||||
}
|
||||
|
||||
cachedCodeQL = await getCodeQLForCmd(codeqlCmd, checkVersion);
|
||||
@@ -1150,7 +1150,7 @@ export async function getCodeQLForCmd(
|
||||
checkVersion &&
|
||||
!(await util.codeQlVersionAbove(codeql, CODEQL_MINIMUM_VERSION))
|
||||
) {
|
||||
throw new Error(
|
||||
throw new util.UserError(
|
||||
`Expected a CodeQL CLI with version at least ${CODEQL_MINIMUM_VERSION} but got version ${
|
||||
(await codeql.getVersion()).version
|
||||
}`,
|
||||
|
||||
Reference in New Issue
Block a user