Skip to content

Commit

Permalink
fix(start): don't use Promise.allSettled
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed Nov 2, 2019
1 parent e44ddfc commit a0067e1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

```sh
# Install the agoric devtool.
# NOTE: If you can't do this, use `npx agoric` each time you see `agoric`
npm install -g agoric
# Initialize your dapp project.
agoric init my-dapp
Expand Down
6 changes: 3 additions & 3 deletions lib/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ export default async function startMain(progname, rawArgs, priv) {
console.log(chalk.green('linking html directories'));
const dappHtml = '.agservers/solo/dapp-html';
const htmlWallet = '.agservers/solo/html/wallet';
await Promise.allSettled([fs.unlink(dappHtml), fs.unlink(htmlWallet)]);
await Promise.allSettled([fs.symlink('../../ui/build', dappHtml),
fs.symlink('../../node_modules/@agoric/wallet-frontend/build', htmlWallet)]);
await Promise.all([fs.unlink(dappHtml).catch(() => {}), fs.unlink(htmlWallet).catch(() => {})]);
await Promise.all([fs.symlink('../../ui/build', dappHtml).catch(() => {}),
fs.symlink('../../node_modules/@agoric/wallet-frontend/build', htmlWallet).catch(() => {})]);

await pspawn(`../${css}/bin/ag-solo`, ['start', '--role=three_client'], {
stdio: 'inherit',
Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
"description": "Manage the Agoric Javascript smart contract platform",
"main": "lib/main.js",
"bin": "bin/agoric",
"files": [
"lib",
"template"
],
"scripts": {
"test": "tape -r esm 'test/**/*.js'",
"lint-fix": "eslint --fix '**/*.{js,jsx}'",
Expand Down

0 comments on commit a0067e1

Please sign in to comment.