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
3
lib/codeql.js
generated
3
lib/codeql.js
generated
|
|
@ -283,10 +283,11 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
|||
else if (await util.codeQlVersionAtLeast(this, exports.CODEQL_VERSION_SUBLANGUAGE_FILE_COVERAGE)) {
|
||||
extraArgs.push("--no-sublanguage-file-coverage");
|
||||
}
|
||||
const overwriteFlag = (0, tools_features_1.isSupportedToolsFeature)(await this.getVersion(), tools_features_1.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