Use --force-overwrite for creating databases
...but only if the feature exists in the CLI.
This commit is contained in:
parent
c7964947b4
commit
0a64ae0929
6 changed files with 12 additions and 4 deletions
|
|
@ -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}`,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue