Skip to content

Commit

Permalink
Merge pull request #2430 from github/henrymercer/windows-diagnostics-fix
Browse files Browse the repository at this point in the history
Fix writing diagnostics on Windows
  • Loading branch information
henrymercer committed Aug 19, 2024
2 parents 5c681ef + e2bb5a2 commit b187c86
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Note that the only difference between `v2` and `v3` of the CodeQL Action is the

## [UNRELEASED]

No user facing changes.
- 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)

## 3.26.2 - 14 Aug 2024

Expand Down
4 changes: 3 additions & 1 deletion lib/diagnostics.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/diagnostics.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/diagnostics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ function writeDiagnostic(

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

writeFileSync(jsonPath, JSON.stringify(diagnostic));
Expand Down

0 comments on commit b187c86

Please sign in to comment.