Browse Source

fix(archive): fix compress failure on Windows

Evshiron Magicka 8 years ago
parent
commit
5ef54b133b
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/lib/archive.ts

+ 3 - 3
src/lib/archive.ts

@@ -64,7 +64,9 @@ export async function compress(dir: string, files: string[], type: string, archi
     debug('in compress', 'type', type);
     debug('in compress', 'archive', archive);
 
-    const { path: listfiles, cleanup } = await tmpFile();
+    const { path: listfiles } = await tmpFile({
+        discardDescriptor: true,
+    });
 
     debug('in compress', 'listfiles', listfiles);
 
@@ -74,8 +76,6 @@ export async function compress(dir: string, files: string[], type: string, archi
         cwd: dir,
     });
 
-    cleanup();
-
     return code;
 
 }