Skip to content

Commit ff3642d

Browse files
committed
update
1 parent bab1b48 commit ff3642d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/testtools/src/schema.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import * as path from 'path';
1717
import tmp from 'tmp';
1818
import { loadDocument } from 'zenstack/cli/cli-util';
1919
import prismaPlugin from 'zenstack/plugins/prisma';
20+
import os from 'os';
2021

2122
/**
2223
* Use it to represent multiple files in a single string like this
@@ -31,7 +32,6 @@ import prismaPlugin from 'zenstack/plugins/prisma';
3132
export const FILE_SPLITTER = '#FILE_SPLITTER#';
3233

3334
const tempDirs: string[] = [];
34-
tmp.setGracefulCleanup();
3535

3636
export type FullDbClientContract = CrudContract & {
3737
$on(eventType: any, callback: (event: any) => void): void;
@@ -427,6 +427,7 @@ function loadModule(module: string, basePath: string): any {
427427
}
428428

429429
export function cleanUpTemps() {
430+
process.chdir(os.tmpdir());
430431
tempDirs.forEach((d) => {
431432
console.log('Cleaning up temp dir:', d);
432433
if (fs.existsSync(d)) {

0 commit comments

Comments
 (0)