fix(lib/vscode): make mkdir recursive

This commit is contained in:
Joe Previte 2021-03-11 16:18:58 -07:00
parent 25dbb5b1b6
commit 8f414b5005
No known key found for this signature in database
GPG Key ID: 2C91590C6B742C24
1 changed files with 2 additions and 2 deletions

View File

@ -137,7 +137,7 @@ const extractTar = async (tarPath: string, targetPath: string, options: IExtract
See commit: https://github.com/microsoft/vscode/commit/a0d76bb9834b63a02fba8017a6306511fe1ab4fe#diff-2bf233effbb62ea789bb7c4739d222a43ccd97ed9f1219f75bb07e9dee91c1a7 See commit: https://github.com/microsoft/vscode/commit/a0d76bb9834b63a02fba8017a6306511fe1ab4fe#diff-2bf233effbb62ea789bb7c4739d222a43ccd97ed9f1219f75bb07e9dee91c1a7
3/11/21 @jsjoeio 3/11/21 @jsjoeio
*/ */
return fs.promises.mkdir(targetFileName).then(nextEntry) return fs.promises.mkdir(targetFileName, { recursive: true }).then(nextEntry)
} }
const dirName = path.dirname(fileName); const dirName = path.dirname(fileName);
@ -151,7 +151,7 @@ const extractTar = async (tarPath: string, targetPath: string, options: IExtract
See commit: https://github.com/microsoft/vscode/commit/a0d76bb9834b63a02fba8017a6306511fe1ab4fe#diff-2bf233effbb62ea789bb7c4739d222a43ccd97ed9f1219f75bb07e9dee91c1a7 See commit: https://github.com/microsoft/vscode/commit/a0d76bb9834b63a02fba8017a6306511fe1ab4fe#diff-2bf233effbb62ea789bb7c4739d222a43ccd97ed9f1219f75bb07e9dee91c1a7
3/11/21 @jsjoeio 3/11/21 @jsjoeio
*/ */
await fs.promises.mkdir(targetDirName) await fs.promises.mkdir(targetDirName, { recursive: true })
const fstream = fs.createWriteStream(targetFileName, { mode: header.mode }); const fstream = fs.createWriteStream(targetFileName, { mode: header.mode });
fstream.once('close', () => next()); fstream.once('close', () => next());