Skip to content

Commit b187c86

Browse files
authored
Merge pull request github#2430 from github/henrymercer/windows-diagnostics-fix
Fix writing diagnostics on Windows
2 parents 5c681ef + e2bb5a2 commit b187c86

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

CHANGELOG.md

+1-1
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+
- Fix an issue where the CodeQL Action could not write diagnostic messages on Windows. This issue did not impact analysis quality. [#2430](https://github.com/github/codeql-action/pull/2430)
1010

1111
## 3.26.2 - 14 Aug 2024
1212

lib/diagnostics.js

+3-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/diagnostics.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/diagnostics.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ function writeDiagnostic(
145145

146146
const jsonPath = path.resolve(
147147
diagnosticsPath,
148-
`codeql-action-${diagnostic.timestamp}.json`,
148+
// Remove colons from the timestamp as these are not allowed in Windows filenames.
149+
`codeql-action-${diagnostic.timestamp.replaceAll(":", "")}.json`,
149150
);
150151

151152
writeFileSync(jsonPath, JSON.stringify(diagnostic));

0 commit comments

Comments
 (0)