Skip to content

Commit 5731ca6

Browse files
committed
Fix error
1 parent 96c12a6 commit 5731ca6

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/github/codegen.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import fs from "node:fs";
2+
import path from "node:path";
23
import type { CodegenConfig } from "@graphql-codegen/cli";
34

45
const schemaPath = "node_modules/.cache/github-graphql-schema.graphql";
@@ -12,6 +13,7 @@ if (process.env.CI || !fs.existsSync(schemaPath)) {
1213
`Failed to fetch GitHub GraphQL schema: ${result.status} ${result.statusText}`,
1314
);
1415
}
16+
fs.mkdirSync(path.dirname(schemaPath), { recursive: true });
1517
fs.writeFileSync(schemaPath, await result.text());
1618
}
1719

0 commit comments

Comments
 (0)