Skip to content

Commit

Permalink
Fix runnable-textpacker.jar download
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Ecconia committed Aug 29, 2024
1 parent 6ff5cc2 commit 241f166
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gulp/image-resources.js
Original file line number Diff line number Diff line change
Expand Up @@ -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!");
}
Expand Down

0 comments on commit 241f166

Please sign in to comment.