Skip to content

Commit

Permalink
Merge pull request #8777 from Agoric/gibson-2024-01-cleanup-clean-cor…
Browse files Browse the repository at this point in the history
…e-eval.js

chore(cosmic-swingset): Propagate errors from `main` in clean-core-eval.js
  • Loading branch information
mergify[bot] authored Feb 1, 2024
2 parents 7bf5870 + 811d180 commit b7a5c92
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions packages/cosmic-swingset/scripts/clean-core-eval.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,13 @@ export const main = async (argv, { readFile, stdout }) => {

if (isEntrypoint(import.meta.url)) {
/* global process */
void farExports.E.when(
import('fs/promises'),
fsp =>
main([...process.argv], {
readFile: fsp.readFile,
stdout: process.stdout,
}),
err => {
process.exitCode = 1;
console.error(err);
},
);
void farExports.E.when(import('fs/promises'), fsp =>
main([...process.argv], {
readFile: fsp.readFile,
stdout: process.stdout,
}),
).catch(err => {
process.exitCode = 1;
console.error(err);
});
}

0 comments on commit b7a5c92

Please sign in to comment.