Skip to content

Commit

Permalink
fix(index): forgot to pass data around
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoscaceres committed May 1, 2017
1 parent 1c9a4f6 commit 9b7b8c0
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ async function performGitTasks(collectedData) {
}
await git.switchBranch(collectedData.mainBranch);
console.info(g(` ${chk} switched to branch ${collectedData.mainBranch}`));
return collectedData;
}

function populateTemplate(rawData, collectedData, file) {
Expand Down Expand Up @@ -156,13 +155,13 @@ program
.action(async (name, options) => {
console.info(messages.logo);
try {
await collectProjectData(name, options);
await performGitTasks();
await writeTemplates();
await postInitialization();
const collectedData = await collectProjectData(name, options);
await performGitTasks(collectedData);
await writeTemplates(collectedData);
} catch (err) {
console.error(`\n 💥 ${r(err.message)}`);
}
postInitialization();
});

program.parse(process.argv);
Expand Down

0 comments on commit 9b7b8c0

Please sign in to comment.