Arif Acar
Arif Acar

Reputation: 1571

SourceTree - flags:ERROR short flag required for (showcommands) on this platform

I am using SourceTree for macOS for a git-repository. I created feature on git-flow and I completed. When I try to make it as "Finish Feature" I am getting this error message:

flags:ERROR short flag required for (showcommands) on this platform
flags:ERROR short flag required for (push) on this platform
flags:ERROR short flag required for (keepremote) on this platform
flags:ERROR short flag required for (keeplocal) on this platform
flags:ERROR short flag required for (squash-info) on this platform
flags:ERROR short flag required for (no-ff!) on this platform
/Applications/Sourcetree.app/Contents/Resources/git_local/gitflow/gitflow-common: line 81: [: -eq: unary operator expected
/Applications/Sourcetree.app/Contents/Resources/git_local/gitflow/gitflow-common: line 81: [: -eq: unary operator expected
fatal: could not read Password for 'https://[email protected]': Device not configured
Fatal: Could not fetch feature/Passenger_Type from origin.

I am getting success message when I try to commit my regular changes. I checked gitflow-common executable file, this is line 81:

if [ -f ~/.gitflow_export ]; then
    if grep -E 'GITFLOW_FLAG_(SHOWCOMMANDS|INIT|FEATURE|HOTFIX|RELEASE|SUPPORT)' ~/.gitflow_export > /dev/null; then
        echo "Using environment variables for \"showcommands\", \"init\", \"feature\", \"hotfix\", \"release\" and \"support\" in ~/.gitflow_export has deprecated, use git config instead."
        echo ""
        exit 1;
    else
        . ~/.gitflow_export
    fi
fi

Upvotes: 1

Views: 640

Answers (2)

Mrunmayee Mhatre
Mrunmayee Mhatre

Reputation: 1

I encountered similar issue's on my mac and the below steps solved this issue:

  1. brew doctor
  2. Perform steps recommended by brew in output for steps 1
  3. brew update
  4. brew install git
  5. brew install git-flow-avh

Hope it helps, all the best !!

Upvotes: 0

Allan Edwards
Allan Edwards

Reputation: 21

I encountered the same issue on macOS running Sourcetree 2.7.1 (159), trying to close a feature branch.

I didn't want to potentially create future errors, so I just downgraded to 2.6.3, everything works as expected.

fyi, I believe this a known issue and will be resolved in a future release of sourcetree.

For reference: I did find an article describing the issue and a possible solution for version 2.7.1 (159): https://community.atlassian.com/t5/Sourcetree-questions/Is-git-flow-broken-in-Sourcetree-2-7-1/qaq-p/728759.

Upvotes: 2

Related Questions