Skip to content

Commit ca3043e

Browse files
authored
Merge branch 'main' into dependabot/npm_and_yarn/npm-8402b9d28a
2 parents c65a150 + 81b8143 commit ca3043e

File tree

10 files changed

+23
-8
lines changed

10 files changed

+23
-8
lines changed

.github/workflows/script/update-node-modules.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1+
#!/bin/bash
2+
set -eu
3+
14
if [ "$1" != "update" && "$1" != "check-only" ]; then
25
>&2 echo "Failed: Invalid argument. Must be 'update' or 'check-only'"
36
exit 1
47
fi
58

6-
sudo npm install --force -g [email protected]
9+
npm install --force -g [email protected]
710

811
# clean the npm cache to ensure we don't have any files owned by root
912
sudo npm cache clean --force

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Note that the only difference between `v2` and `v3` of the CodeQL Action is the
66

77
## [UNRELEASED]
88

9-
No user facing changes.
9+
- Avoid failing database creation if the database folder already exists and contains some unexpected files. [#2330](https://github.com/github/codeql-action/pull/2330)
1010

1111
## 3.25.8 - 04 Jun 2024
1212

lib/api-compatibility.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "maximumVersion": "3.13", "minimumVersion": "3.9" }
1+
{ "maximumVersion": "3.14", "minimumVersion": "3.9" }

lib/codeql.js

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/codeql.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/tools-features.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/tools-features.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/api-compatibility.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"maximumVersion": "3.13", "minimumVersion": "3.9"}
1+
{"maximumVersion": "3.14", "minimumVersion": "3.9"}

src/codeql.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,12 +612,19 @@ export async function getCodeQLForCmd(
612612
extraArgs.push("--no-sublanguage-file-coverage");
613613
}
614614

615+
const overwriteFlag = isSupportedToolsFeature(
616+
await this.getVersion(),
617+
ToolsFeature.ForceOverwrite,
618+
)
619+
? "--force-overwrite"
620+
: "--overwrite";
621+
615622
await runTool(
616623
cmd,
617624
[
618625
"database",
619626
"init",
620-
"--overwrite",
627+
overwriteFlag,
621628
"--db-cluster",
622629
config.dbLocation,
623630
`--source-root=${sourceRoot}`,

src/tools-features.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export enum ToolsFeature {
88
SetsCodeqlRunnerEnvVar = "setsCodeqlRunnerEnvVar",
99
TraceCommandUseBuildMode = "traceCommandUseBuildMode",
1010
SarifMergeRunsFromEqualCategory = "sarifMergeRunsFromEqualCategory",
11+
ForceOverwrite = "forceOverwrite",
1112
}
1213

1314
/**

0 commit comments

Comments
 (0)