* refactor(commit.ts): extract stdout from git push command into a variable

This commit is contained in:
di-sukharev
2023-03-09 21:32:07 +08:00
parent 7bbc97980e
commit 1050cad95d
+2 -1
View File
@@ -54,8 +54,9 @@ ${chalk.grey('——————————————————')}`
if (isPushConfirmedByUser && !isCancel(isPushConfirmedByUser)) {
const pushSpinner = spinner();
pushSpinner.start('Running `git push`');
await execa('git', ['push']);
const { stdout } = await execa('git', ['push']);
pushSpinner.stop(`${chalk.green('✔')} successfully pushed all commits`);
if (stdout) outro(stdout);
}
} else outro(`${chalk.gray('✖')} process cancelled`);
};