Skip to content

Commit 756d9bf

Browse files
committed
Feat: spawn commit
1 parent 273138f commit 756d9bf

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/sgcPrompt.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ import execa from 'execa';
33
import inquirer from 'inquirer';
44
import getConfig from './getConfig';
55

6-
const cwd = process.cwd();
7-
86
const sgcPrompt = () => {
97
const config = getConfig();
108
const choices = [];
@@ -46,10 +44,10 @@ const sgcPrompt = () => {
4644
const message = answers.moreInfo ? `"${answers.editor}"` : `"${answers.type} ${answers.description}"`;
4745

4846
execa('git', ['commit', '-m', message])
49-
.then((result) => console.log(process.stdout))
47+
.then(result => console.log(result.stdout))
5048
.catch((err) => {
5149
console.error(chalk.red("Have you thought about 'git add' some files? Add files and try run following again:\n"));
52-
console.error(chalk.green(err.cmd))
50+
console.error(chalk.green(err.cmd));
5351
});
5452
});
5553
};

0 commit comments

Comments
 (0)