Skip to content

Commit 70040b7

Browse files
Fix for 'Invalid extraction directory' on macOS (#303)
Added a line that ensures `extractDir` exists before attempting to unzip to it.
1 parent c5fcdb6 commit 70040b7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/download.ts

+4
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,10 @@ async function unzipVSCode(
383383
// darwin or *nix sync
384384
await pipelineAsync(stream, fs.createWriteStream(stagingFile));
385385
await checksum;
386+
387+
// unzip does not create intermediate directories when using -d
388+
await fs.promises.mkdir(extractDir, { recursive: true });
389+
386390
await spawnDecompressorChild('unzip', ['-q', stagingFile, '-d', extractDir]);
387391
}
388392
} finally {

0 commit comments

Comments
 (0)