Skip to content

hotfix-finish fails in non-interactive mode if hotfix branch does not exist locally #409

Description

@paschi

When trying to run hotfix-finish in non-interactive mode, the goal will fail if the hotfix branch does not exist on the local environment.

For example

mvn gitflow:hotfix-start -B -DhotfixVersion=1.6.2 -DpushRemote=true
git checkout master
git branch -D hotfix/1.6.2
mvn gitflow:hotfix-finish -B -DhotfixVersion=1.6.2 -DpushRemote=true

results in

[ERROR] Failed to execute goal com.amashchenko.maven.plugin:gitflow-maven-plugin:1.21.0:hotfix-finish (default-cli) on project test-repo: hotfix-finish: Hotfix branch with name 'hotfix/1.6.2' doesn't exist. Cannot finish hotfix. -> [Help 1]

IMHO it should check if the branch exists on remote instead of local and fetch it if it is not yet present locally. That way it would be consistent with how the release-finish goal works.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions