Skip to content

Commit

Permalink
feat: agoric run --verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Jun 14, 2024
1 parent 89a9e60 commit c3397d6
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions packages/agoric-cli/src/main.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
/* global process */
import { Command } from 'commander';
import path from 'path';
import url from 'url';
import { assert, details as X } from '@agoric/assert';
import {
DEFAULT_KEEP_POLLING_SECONDS,
DEFAULT_JITTER_SECONDS,
DEFAULT_KEEP_POLLING_SECONDS,
} from '@agoric/casting';
import { Command } from 'commander';
import path from 'path';
import url from 'url';
import { makeWalletCommand } from './commands/wallet.js';
import cosmosMain from './cosmos.js';
import deployMain from './deploy.js';
import runMain from './run.js';
import publishMain from './main-publish.js';
import followMain from './follow.js';
import initMain from './init.js';
import installMain from './install.js';
import { statPlans } from './lib/bundles.js';
import publishMain from './main-publish.js';
import walletMain from './open.js';
import runMain from './run.js';
import setDefaultsMain from './set-defaults.js';
import startMain from './start.js';
import followMain from './follow.js';
import walletMain from './open.js';
import { makeWalletCommand } from './commands/wallet.js';

const DEFAULT_DAPP_TEMPLATE = 'dapp-offer-up';
const DEFAULT_DAPP_URL_BASE = 'https://github.com/Agoric/';
Expand Down Expand Up @@ -46,6 +47,7 @@ const main = async (progname, rawArgs, powers) => {
return true;
}

// XXX exits process when fn resolves
function subMain(fn, args, options) {
return fn(progname, args, powers, options).then(
// This seems to be the only way to propagate the exit code.
Expand Down Expand Up @@ -287,7 +289,11 @@ const main = async (progname, rawArgs, powers) => {
.passThroughOptions(true)
.action(async (script, scriptArgs, _options, cmd) => {
const opts = { ...program.opts(), ...cmd.opts(), ...cmdOpts, scriptArgs };
return subMain(runMain, ['run', script], opts);
await runMain(progname, ['run', script], powers, opts);

if (opts.verbose) {
await statPlans(process.cwd());
}
});

baseCmd('deploy [script...]')
Expand Down

0 comments on commit c3397d6

Please sign in to comment.