Skip to content

Commit e5a6587

Browse files
committed
Fix writing diagnostics on Windows
Remove colons from the generated filename so it is valid on Windows.
1 parent 5c681ef commit e5a6587

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

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)