Skip to content

Commit e34420f

Browse files
committed
ensure dir exists when non-default
1 parent 6436b2b commit e34420f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/core/temp.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ export function globalTempContext() {
5555
}
5656

5757
export function createTempContext(options?: Deno.MakeTempOptions): TempContext {
58+
if (options?.dir) {
59+
ensureDirSync(options?.dir);
60+
}
5861
let dir: string | undefined = Deno.makeTempDirSync({
5962
dir: tempDir,
6063
...options,

0 commit comments

Comments
 (0)