File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import * as path from 'path';
1717import tmp from 'tmp' ;
1818import { loadDocument } from 'zenstack/cli/cli-util' ;
1919import 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';
3132export const FILE_SPLITTER = '#FILE_SPLITTER#' ;
3233
3334const tempDirs : string [ ] = [ ] ;
34- tmp . setGracefulCleanup ( ) ;
3535
3636export 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
429429export function cleanUpTemps ( ) {
430+ process . chdir ( os . tmpdir ( ) ) ;
430431 tempDirs . forEach ( ( d ) => {
431432 console . log ( 'Cleaning up temp dir:' , d ) ;
432433 if ( fs . existsSync ( d ) ) {
You can’t perform that action at this time.
0 commit comments