Skip to content

Commit 97fb30d

Browse files
committed
Remove ForceOverwrite tools feature
This feature has been supported since CodeQL CLI v2.18.0, which is below the new minimum version.
1 parent d122da3 commit 97fb30d

13 files changed

Lines changed: 101 additions & 71 deletions

‎lib/analyze-action-post.js‎

Lines changed: 9 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎lib/analyze-action.js‎

Lines changed: 9 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎lib/autobuild-action.js‎

Lines changed: 9 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎lib/init-action-post.js‎

Lines changed: 9 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎lib/init-action.js‎

Lines changed: 9 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎lib/resolve-environment-action.js‎

Lines changed: 9 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎lib/setup-codeql-action.js‎

Lines changed: 9 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎lib/upload-lib.js‎

Lines changed: 9 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎lib/upload-sarif-action.js‎

Lines changed: 9 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/codeql.test.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,15 +1072,15 @@ test.serial(
10721072
);
10731073

10741074
test.serial(
1075-
"Avoids duplicating --overwrite flag if specified in CODEQL_ACTION_EXTRA_OPTIONS",
1075+
"Avoids duplicating --force-overwrite flag if specified in CODEQL_ACTION_EXTRA_OPTIONS",
10761076
async (t) => {
10771077
const runnerConstructorStub = stubToolRunnerConstructor();
10781078
const codeqlObject = await stubCodeql();
10791079
// io throws because of the test CodeQL object.
10801080
sinon.stub(io, "which").resolves("");
10811081

10821082
process.env["CODEQL_ACTION_EXTRA_OPTIONS"] =
1083-
'{ "database": { "init": ["--overwrite"] } }';
1083+
'{ "database": { "init": ["--force-overwrite"] } }';
10841084

10851085
await codeqlObject.databaseInitCluster(
10861086
stubConfig,
@@ -1093,9 +1093,9 @@ test.serial(
10931093
t.true(runnerConstructorStub.calledOnce);
10941094
const args = runnerConstructorStub.firstCall.args[1] as string[];
10951095
t.is(
1096-
args.filter((option: string) => option === "--overwrite").length,
1096+
args.filter((option: string) => option === "--force-overwrite").length,
10971097
1,
1098-
"--overwrite should only be passed once",
1098+
"--force-overwrite should only be passed once",
10991099
);
11001100

11011101
// Clean up

0 commit comments

Comments
 (0)