From cc4569966e75fb7091a18eaaa71621caf5a55ce4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Sat, 18 Jan 2025 09:19:38 -0600 Subject: [PATCH] Update applyPatches.ts --- packages/scripts/src/applyPatches.ts | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/packages/scripts/src/applyPatches.ts b/packages/scripts/src/applyPatches.ts index a01793432..fd9379787 100644 --- a/packages/scripts/src/applyPatches.ts +++ b/packages/scripts/src/applyPatches.ts @@ -46,23 +46,17 @@ while (true) { files.length, ); - await Promise.all( - files.map(async ({ path, data }) => { - const { dir } = parsePath(path); - const dirPath = `${DATA}/${dir}`; + for (const { path, data } of files) { + const { dir } = parsePath(path); - if (!existsSync(dirPath)) { - await mkdir(dirPath, { recursive: true }); - } + await mkdir(`${DATA}/${dir}`, { recursive: true }); + await writeFile( + `${DATA}/${path}`, + new Uint8Array(writeDVPL(Buffer.from(data))), + ); - await writeFile( - `${DATA}/${path}`, - new Uint8Array(writeDVPL(Buffer.from(data))), - ); - - bar.tick(); - }), - ); + bar.tick(); + } if ('dynamicContentLocalizationsDir' in data) { console.log('Found dynamic content localizations; patching...');