Skip to content

Commit

Permalink
fix: run ag-setup-cosmos under SES
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed Feb 12, 2021
1 parent 3ce7587 commit 13c8efe
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
21 changes: 13 additions & 8 deletions packages/deployment/ag-setup-cosmos
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
#! /usr/bin/env node

require = require('esm')(module);
const deploy = require(`${__dirname}/main.js`).default;
const esmRequire = require('esm')(module);

esmRequire('@agoric/install-ses');

const deploy = esmRequire(`${__dirname}/main.js`).default;

process.on('SIGINT', () => process.exit(-1));
deploy(process.argv[1], process.argv.splice(2))
.then(res => process.exit(res || 0),
rej => {
console.error(`error running ag-setup-cosmos:`, rej);
process.exit(1);
});
deploy(process.argv[1], process.argv.splice(2)).then(
res => process.exit(res || 0),
rej => {
console.error(`error running ag-setup-cosmos:`, rej);
process.exit(1);
},
);
2 changes: 2 additions & 0 deletions packages/deployment/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@
"author": "Agoric",
"license": "Apache-2.0",
"dependencies": {
"@agoric/install-ses": "^0.5.0",
"chalk": "^2.4.2",
"deterministic-json": "^1.0.5",
"esm": "^3.2.25",
"inquirer": "^6.3.1",
"minimist": "^1.2.0",
"node-fetch": "^2.6.0",
Expand Down

0 comments on commit 13c8efe

Please sign in to comment.