Skip to content

Commit

Permalink
Fix: create codeql-action diagnostics directory
Browse files Browse the repository at this point in the history
  • Loading branch information
mbg committed Oct 5, 2023
1 parent faf7528 commit 7f4a948
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions 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.

6 changes: 5 additions & 1 deletion src/diagnostics.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { writeFileSync } from "fs";
import { mkdirSync, writeFileSync } from "fs";
import path from "path";

import { Config } from "./config-utils";
Expand Down Expand Up @@ -86,6 +86,10 @@ export function addDiagnostic(config: Config, diagnostic: DiagnosticMessage) {
"diagnostic",
"codeql-action",
);

// Create the directory if it doesn't exist yet.
mkdirSync(diagnosticsPath, { recursive: true });

const jsonPath = path.resolve(
diagnosticsPath,
`codeql-action-${diagnostic.timestamp}.json`,
Expand Down

0 comments on commit 7f4a948

Please sign in to comment.