Skip to content

Commit 8320b18

Browse files
author
DevBot
committed
fix(tools): create .tmp before content-example compilation (#1159)
Clean CI checkouts do not carry the gitignored .tmp directory, so Deno.makeTempDir({ dir: '.tmp' }) failed closed (NotFound) in content:examples-check and its tests. Create it recursively first.
1 parent cf9bd74 commit 8320b18

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tools/check-content-examples.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ export async function workspacePaths(): Promise<Record<string, string[]>> {
6969
export async function typeCheckExamples(examples: ContentExample[]): Promise<ExampleFailure[]> {
7070
if (examples.length === 0) return [];
7171
// The temp dir must live inside the workspace so node_modules resolution
72-
// (vite, preact, ...) walks up to the repo's dependencies.
72+
// (vite, preact, ...) walks up to the repo's dependencies; `.tmp` is
73+
// gitignored, so create it first (clean CI checkouts do not carry it).
74+
await Deno.mkdir('.tmp', { recursive: true });
7375
const dir = await Deno.makeTempDir({ dir: '.tmp', prefix: 'content-examples-' });
7476
try {
7577
const files: string[] = [];

0 commit comments

Comments
 (0)