Skip to content

Commit e967966

Browse files
committed
🐛 Fix: change error message, and add stdio for a better output (fixes #21)
1 parent d47a9ef commit e967966

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/cli.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,9 @@ if (argv.v) {
3131
inquirer.prompt(questionsList).then((answers) => {
3232
const message = answers.moreInfo ? `${answers.editor}` : `${answers.type} ${answers.description}`;
3333

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

0 commit comments

Comments
 (0)