Skip to content

Commit

Permalink
fix for interactive mode and custom commitMessage
Browse files Browse the repository at this point in the history
  • Loading branch information
dgaidula committed Oct 4, 2023
1 parent 560666d commit 0a3cbf0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Actions/CodeUpAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,9 @@ public function run(?string $stage = null)
// Changed files
$this->noteBlock('Uncommitted changes:' . PHP_EOL . $status);

$defaultMessage = $this->interactive ? null : "Auto push latest to $upstream";
$defaultMessage = $this->commitMessage ? $this->commitMessage : $defaultMessage;
$defaultMessage = $this->commitMessage ? $this->commitMessage : $defaultMessage;
//interactive must be false for custom commit message
$defaultMessage = $this->interactive ? null : "Push latest to $upstream";

if (! $msg = $this->ask(
'Enter a commit message, or leave it empty to abort the commit',
Expand Down

0 comments on commit 0a3cbf0

Please sign in to comment.