Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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();
})()
})()