From a8839353f79be20b75905e2de4788276c051d638 Mon Sep 17 00:00:00 2001 From: di-sukharev Date: Thu, 9 Mar 2023 21:25:38 +0800 Subject: [PATCH] * chore(commit.ts): add spinner to indicate `git push` process * refactor(commit.ts): change success message to include spinner in `git push` process --- src/commands/commit.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/commands/commit.ts b/src/commands/commit.ts index 4e8a410..4262057 100644 --- a/src/commands/commit.ts +++ b/src/commands/commit.ts @@ -52,8 +52,10 @@ ${chalk.grey('——————————————————')}` }); if (isPushConfirmedByUser && !isCancel(isPushConfirmedByUser)) { + const pushSpinner = spinner(); + pushSpinner.start('Running `git push`'); const { stdout } = await execa('git', ['push']); - outro(`${chalk.green('✔')} successfully pushed all commits`); + pushSpinner.stop(`${chalk.green('✔')} successfully pushed all commits`); outro(stdout); } } else outro(`${chalk.gray('✖')} process cancelled`);