From 8f414b50059fb74e0533b6fb5cc704f29d00de91 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Thu, 11 Mar 2021 16:18:58 -0700 Subject: [PATCH] fix(lib/vscode): make mkdir recursive --- lib/vscode/src/vs/server/node/marketplace.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/vscode/src/vs/server/node/marketplace.ts b/lib/vscode/src/vs/server/node/marketplace.ts index b280a87cf..66ebc84bc 100644 --- a/lib/vscode/src/vs/server/node/marketplace.ts +++ b/lib/vscode/src/vs/server/node/marketplace.ts @@ -137,7 +137,7 @@ const extractTar = async (tarPath: string, targetPath: string, options: IExtract See commit: https://github.com/microsoft/vscode/commit/a0d76bb9834b63a02fba8017a6306511fe1ab4fe#diff-2bf233effbb62ea789bb7c4739d222a43ccd97ed9f1219f75bb07e9dee91c1a7 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); @@ -151,7 +151,7 @@ const extractTar = async (tarPath: string, targetPath: string, options: IExtract See commit: https://github.com/microsoft/vscode/commit/a0d76bb9834b63a02fba8017a6306511fe1ab4fe#diff-2bf233effbb62ea789bb7c4739d222a43ccd97ed9f1219f75bb07e9dee91c1a7 3/11/21 @jsjoeio */ - await fs.promises.mkdir(targetDirName) + await fs.promises.mkdir(targetDirName, { recursive: true }) const fstream = fs.createWriteStream(targetFileName, { mode: header.mode }); fstream.once('close', () => next());