Skip to content

Commit 7f4a948

Browse files
committed
Fix: create codeql-action diagnostics directory
1 parent faf7528 commit 7f4a948

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

lib/diagnostics.js

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

lib/diagnostics.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/diagnostics.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { writeFileSync } from "fs";
1+
import { mkdirSync, writeFileSync } from "fs";
22
import path from "path";
33

44
import { Config } from "./config-utils";
@@ -86,6 +86,10 @@ export function addDiagnostic(config: Config, diagnostic: DiagnosticMessage) {
8686
"diagnostic",
8787
"codeql-action",
8888
);
89+
90+
// Create the directory if it doesn't exist yet.
91+
mkdirSync(diagnosticsPath, { recursive: true });
92+
8993
const jsonPath = path.resolve(
9094
diagnosticsPath,
9195
`codeql-action-${diagnostic.timestamp}.json`,

0 commit comments

Comments
 (0)