Skip to content

Commit

Permalink
fix: run mkdir with recursive option to prevent exceptions
Browse files Browse the repository at this point in the history
Fixes #662
  • Loading branch information
michaelfig committed Mar 6, 2020
1 parent d5df315 commit a01fa04
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/agoric-cli/lib/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export default async function initMain(progname, rawArgs, priv, opts) {
if (st.isDirectory()) {
if (!target) {
console.log(`mkdir ${destDir}${stem}`);
await mkdir(`${destDir}${stem}`);
await mkdir(`${destDir}${stem}`, { recursive: true });
}
await recursiveTemplate(templateDir, destDir, `${stem}`);
} else if (st.isSymbolicLink()) {
Expand All @@ -88,7 +88,7 @@ export default async function initMain(progname, rawArgs, priv, opts) {
);
};
await recursiveTemplate(dappRoot);
await mkdir(`${DIR}/_agstate`);
await mkdir(`${DIR}/_agstate`, { recursive: true });

const ps = ['', 'api/', 'contract/', 'ui/'].map(dir => {
const path = `${DIR}/${dir}package.json`;
Expand Down

0 comments on commit a01fa04

Please sign in to comment.