From 241f166989fe75fc0d4849727dd4efb844753a86 Mon Sep 17 00:00:00 2001 From: Ecconia Date: Thu, 29 Aug 2024 22:16:51 +0200 Subject: [PATCH] Fix runnable-textpacker.jar download Adds 'await' to ensure the download will be complete. Without this the download might never complete. This issue occurred on a Linux OS (which seem to handle file streams a bit different than some other OSs). Effects of not fixing this are that the java execution following this download fails for funny "corrupted jar" and other reasons - depending on the size and content of the incomplete jar file. --- gulp/image-resources.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gulp/image-resources.js b/gulp/image-resources.js index 346d2a03f..d3431babb 100644 --- a/gulp/image-resources.js +++ b/gulp/image-resources.js @@ -94,7 +94,7 @@ export async function buildAtlas() { const escapedLink = JSON.stringify(runnableTPSource); try { - execute(`curl -o runnable-texturepacker.jar ${escapedLink}`); + await execute(`curl -o runnable-texturepacker.jar ${escapedLink}`); } catch { throw new Error("Failed to download runnable-texturepacker.jar!"); }