mirror of
https://github.com/github/codeql-action.git
synced 2025-12-27 17:50:07 +08:00
Add helper function for reserved tools values
This commit is contained in:
@@ -279,8 +279,7 @@ export async function getCodeQLSource(
|
||||
): Promise<CodeQLToolsSource> {
|
||||
if (
|
||||
toolsInput &&
|
||||
!CODEQL_BUNDLE_VERSION_ALIAS.includes(toolsInput) &&
|
||||
!CODEQL_NIGHTLY_TOOLS_INPUTS.includes(toolsInput) &&
|
||||
!isReservedToolsValue(toolsInput) &&
|
||||
!toolsInput.startsWith("http")
|
||||
) {
|
||||
logger.info(`Using CodeQL CLI from local path ${toolsInput}`);
|
||||
@@ -821,3 +820,8 @@ async function getNightlyToolsUrl(logger: Logger) {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function isReservedToolsValue(tools: string): boolean {
|
||||
return CODEQL_BUNDLE_VERSION_ALIAS.includes(tools) ||
|
||||
CODEQL_NIGHTLY_TOOLS_INPUTS.includes(tools);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user