Skip to content

Commit

Permalink
fix: fix discrepencies revealed by the agoric-cli test
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed Mar 6, 2020
1 parent ced2bb6 commit 422b019
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/agoric-cli/lib/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export default async function initMain(progname, rawArgs, priv, opts) {
);
};
await recursiveTemplate(dappRoot);
await mkdir(`${DIR}/_agstate`, { recursive: true });
await mkdir(`${DIR}/_agstate/agoric-servers`, { recursive: true });

const ps = ['', 'api/', 'contract/', 'ui/'].map(dir => {
const path = `${DIR}/${dir}package.json`;
Expand Down
8 changes: 7 additions & 1 deletion packages/agoric-cli/lib/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ export default async function startMain(progname, rawArgs, priv, opts) {
);
await linkHtml(profileName);

if (!popts['restart']) {
// Don't actually run the chain.
return 0;
}

return pspawn(agSolo, ['start', '--role=two_client'], {
stdio: 'inherit',
cwd: agServer,
Expand Down Expand Up @@ -198,7 +203,8 @@ export default async function startMain(progname, rawArgs, priv, opts) {
};

const { _: args, ...popts } = parseArgs(rawArgs, {
boolean: ['reset', 'pull'],
boolean: ['reset', 'restart', 'pull'],
default: { restart: true },
});

const profileName = args[0] || 'dev';
Expand Down

0 comments on commit 422b019

Please sign in to comment.