From 1050cad95d98e81d704e51f35e2801a8a0de33b5 Mon Sep 17 00:00:00 2001 From: di-sukharev Date: Thu, 9 Mar 2023 21:32:07 +0800 Subject: [PATCH] * refactor(commit.ts): extract stdout from git push command into a variable --- src/commands/commit.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/commands/commit.ts b/src/commands/commit.ts index df55be8..ef5caff 100644 --- a/src/commands/commit.ts +++ b/src/commands/commit.ts @@ -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`); };