mirror of
https://github.com/github/codeql-action.git
synced 2026-10-29 09:07:12 +00:00
Use --force-overwrite for creating databases
...but only if the feature exists in the CLI.
This commit is contained in:
@@ -612,12 +612,17 @@ export async function getCodeQLForCmd(
|
||||
extraArgs.push("--no-sublanguage-file-coverage");
|
||||
}
|
||||
|
||||
const overwriteFlag = isSupportedToolsFeature(
|
||||
await this.getVersion(),
|
||||
ToolsFeature.ForceOverwite,
|
||||
) ? "--force-overwrite" : "--overwrite";
|
||||
|
||||
await runTool(
|
||||
cmd,
|
||||
[
|
||||
"database",
|
||||
"init",
|
||||
"--overwrite",
|
||||
overwriteFlag,
|
||||
"--db-cluster",
|
||||
config.dbLocation,
|
||||
`--source-root=${sourceRoot}`,
|
||||
|
||||
Reference in New Issue
Block a user