Skip to content

Commit bd44fca

Browse files
author
Dave Bartolomeo
committed
Use embedded actions extractor only for old CLI versions
1 parent 8392354 commit bd44fca

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/codeql.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -558,9 +558,17 @@ export async function getCodeQLForCmd(
558558
}
559559

560560
if (config.languages.indexOf(Language.actions) >= 0) {
561-
extraArgs.push("--search-path");
562-
const extractorPath = path.resolve(__dirname, "../actions-extractor");
563-
extraArgs.push(extractorPath);
561+
// We originally added an embedded version of the Actions extractor to the CodeQL Action
562+
// itself in order to deploy the extractor between CodeQL releases. When we did add the
563+
// extractor to the CLI, though, its autobuild script was missing the execute bit.
564+
// 2.20.6 is the first CLI release with the fully-functional extractor in the CLI. For older
565+
// versions, we'll keep using the embedded extractor. We can remove the embedded extractor
566+
// once 2.20.6 is deployed in the runner images.
567+
if (!(await util.codeQlVersionAtLeast(codeql, "2.20.6"))) {
568+
extraArgs.push("--search-path");
569+
const extractorPath = path.resolve(__dirname, "../actions-extractor");
570+
extraArgs.push(extractorPath);
571+
}
564572
}
565573

566574
const codeScanningConfigFile = await generateCodeScanningConfig(

0 commit comments

Comments
 (0)