Skip to content

Commit 34c2157

Browse files
authored
chore: fix tmp dirSync implementation (#1939)
1 parent d9c8dca commit 34c2157

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/main/utils/tmp.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ export async function tmpName(options: { template: string }): Promise<string> {
2222
}
2323

2424
export function dirSync(options: { prefix: string }): string {
25-
return fs.mkdtempSync(options.prefix);
25+
const tempPath = fs.mkdtempSync(
26+
path.join(fs.realpathSync(os.tmpdir()), options.prefix),
27+
);
28+
_pathsToCleanup.push(tempPath);
29+
return tempPath;
2630
}
2731

2832
export function setGracefulCleanup(): void {

0 commit comments

Comments
 (0)