Skip to content
This repository has been archived by the owner on Jan 16, 2025. It is now read-only.

Wait until all bundles are written to disk #178

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/spack/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const makeDir = promisify(mkdir);

const emitStart = process.hrtime();
if (spackOptions.output?.path) {
await Object.keys(output).map(async (name) => {
await Promise.all(Object.keys(output).map(async (name) => {
let fullPath = '';
if (isUserDefinedEntry(name)) {
fullPath = join(spackOptions.output.path, spackOptions.output.name.replace('[name]', name));
Expand All @@ -53,7 +53,7 @@ const makeDir = promisify(mkdir);
if (output[name].map) {
await write(`${fullPath}.map`, output[name].map, 'utf-8')
}
});
}));
} else {
throw new Error('Cannot print to stdout: not implemented yet')
}
Expand All @@ -67,4 +67,4 @@ const makeDir = promisify(mkdir);
// }

await build();
})()
})()