mirror of
https://github.com/github/codeql-action.git
synced 2026-01-04 05:30:16 +08:00
Fix compile errors introduced by typescript 4.4.2
4.4.2 introduces a breaking change that the variable in a catch clause is now `unknown` type. So, we need to cast the `e`, `err`, or `error` variables to type `Error`.
This commit is contained in:
@@ -453,7 +453,7 @@ export async function setupCodeQL(
|
||||
cachedCodeQL = await getCodeQLForCmd(codeqlCmd, checkVersion);
|
||||
return { codeql: cachedCodeQL, toolsVersion: codeqlURLVersion };
|
||||
} catch (e) {
|
||||
logger.error(e);
|
||||
logger.error(e instanceof Error ? e : new Error(String(e)));
|
||||
throw new Error("Unable to download and extract CodeQL CLI");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user