Skip to content

Commit 2b3f53d

Browse files
authored
Merge pull request #22 from JPeer264/feature/stdio
Fix: add stdio for a better output
2 parents 45be5de + 445a9ed commit 2b3f53d

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)