diff --git a/src/commands/commit.ts b/src/commands/commit.ts index cc8eb13..b16ff95 100644 --- a/src/commands/commit.ts +++ b/src/commands/commit.ts @@ -63,7 +63,7 @@ ${chalk.grey('——————————————————')}` ); const isCommitConfirmedByUser = await confirm({ - message: 'Confirm the commit message' + message: 'Confirm the commit message?' }); if (isCommitConfirmedByUser && !isCancel(isCommitConfirmedByUser)) { @@ -86,11 +86,19 @@ ${chalk.grey('——————————————————')}` if (isPushConfirmedByUser && !isCancel(isPushConfirmedByUser)) { const pushSpinner = spinner(); + pushSpinner.start(`Running \`git push ${remotes[0]}\``); - const { stdout } = await execa('git', ['push', '--verbose', remotes[0]]); + + const { stdout } = await execa('git', [ + 'push', + '--verbose', + remotes[0] + ]); + pushSpinner.stop( `${chalk.green('✔')} successfully pushed all commits to ${remotes[0]}` ); + if (stdout) outro(stdout); } } else { @@ -101,8 +109,11 @@ ${chalk.grey('——————————————————')}` if (!isCancel(selectedRemote)) { const pushSpinner = spinner(); + pushSpinner.start(`Running \`git push ${selectedRemote}\``); + const { stdout } = await execa('git', ['push', selectedRemote]); + pushSpinner.stop( `${chalk.green( '✔' @@ -197,4 +208,4 @@ export async function commit( process.exit(1); } process.exit(0); -} \ No newline at end of file +}