Skip to content

Commit

Permalink
fix(zoe): use fs.mkdirSync properly
Browse files Browse the repository at this point in the history
thanks @michaelfig for the catch
  • Loading branch information
warner committed Apr 24, 2021
1 parent a41d533 commit d7a8a41
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/zoe/scripts/build-zcfBundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@ import bundleSource from '@agoric/bundle-source';

async function writeSourceBundle(contractFilename, outputPath) {
await bundleSource(contractFilename).then(bundle => {
// TODO: fix
// @ts-ignore mkdirSync believes it only accepts 2 arguments.
fs.mkdirSync(`${__dirname}/../bundles`, { recursive: true }, err => {
if (err) throw err;
});
fs.mkdirSync(`${__dirname}/../bundles`, { recursive: true });
fs.writeFileSync(outputPath, `export default ${JSON.stringify(bundle)};`);
});
}
Expand Down

0 comments on commit d7a8a41

Please sign in to comment.