invert layer order

This commit is contained in:
Cat /dev/Nulo 2023-07-17 19:14:08 -03:00
parent 879a5f1433
commit 0b265c5bc3

View file

@ -48,7 +48,9 @@ export async function tar2squashfs(streams, output, extraFiles) {
p.pipe(child.stdin); p.pipe(child.stdin);
p.on("error", console.error); p.on("error", console.error);
for (const streamP of streams) { // We reverse the arrays because mksquashfs ignores files if they already exist,
// so we leave the last layers first so they are the ones used instead of the last ones
for (const streamP of [...streams].reverse()) {
const stream = await streamP; const stream = await streamP;
const ex = extract(); const ex = extract();