Skip to content

Commit

Permalink
Merge pull request #22 from JPeer264/feature/stdio
Browse files Browse the repository at this point in the history
Fix: add stdio for a better output
  • Loading branch information
JPeer264 committed Apr 16, 2017
2 parents 45be5de + 445a9ed commit 2b3f53d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,9 @@ if (argv.v) {
inquirer.prompt(questionsList).then((answers) => {
const message = answers.moreInfo ? `${answers.editor}` : `${answers.type} ${answers.description}`;

return execa('git', ['commit', '-m', message])
.then(result => console.log(result.stdout))
return execa('git', ['commit', '-m', message], { stdio: 'inherit' })
.catch(() => {
console.error(chalk.red("Have you thought about 'git add' some files? Add files and try run following again:\n"));
console.error(chalk.red('\nAn error occured. Try to resolve the previous error and run following commit message again:'));
console.error(chalk.green(`git commit -m "${message}"`));
});
});
Expand Down

0 comments on commit 2b3f53d

Please sign in to comment.