diff --git a/src/commands/commit.ts b/src/commands/commit.ts index ff101387..9831468d 100644 --- a/src/commands/commit.ts +++ b/src/commands/commit.ts @@ -102,6 +102,8 @@ ${chalk.grey('——————————————————')}` const remotes = await getGitRemotes(); + intro('opencommit - git push'); + if (!remotes.length) { const { stdout } = await execa('git', ['push']); if (stdout) outro(stdout); @@ -114,9 +116,7 @@ ${chalk.grey('——————————————————')}` }); if (isPushConfirmedByUser && !isCancel(isPushConfirmedByUser)) { - const pushSpinner = spinner(); - - pushSpinner.start(`Running 'git push ${remotes[0]}'`); + outro(`Running 'git push ${remotes[0]}' ...`); const { stdout } = await execa('git', [ 'push', @@ -124,7 +124,7 @@ ${chalk.grey('——————————————————')}` remotes[0] ]); - pushSpinner.stop( + outro( `${chalk.green('✔')} Successfully pushed all commits to ${ remotes[0] }` @@ -142,13 +142,12 @@ ${chalk.grey('——————————————————')}` })) as string; if (!isCancel(selectedRemote)) { - const pushSpinner = spinner(); - pushSpinner.start(`Running 'git push ${selectedRemote}'`); + outro(`Running 'git push ${selectedRemote}' ...`); const { stdout } = await execa('git', ['push', selectedRemote]); - pushSpinner.stop( + outro( `${chalk.green( '✔' )} Successfully pushed all commits to ${selectedRemote}`