sublimehq / sublime_merge

Issue tracker for Sublime Merge
https://www.sublimemerge.com
276 stars 14 forks source link

install git-flow #430

Open masciugo opened 5 years ago

masciugo commented 5 years ago

Version info

Description

I've installed git flow with homebrew but..

Screen Shot 2019-03-15 at 12 04 52

cannot see anything about git-flow in the preferences menu

BenjaminSchaaf commented 5 years ago

Does running git flow from the command line work?

Could you also provide the version of Sublime Merge which you are running, thanks.

masciugo commented 5 years ago

yes it works from the command line

Screen Shot 2019-03-27 at 18 15 40

jskinner commented 5 years ago

Try switching the Git Binary (via Preferences/Advanced) between system and bundled

Tenzian commented 5 years ago

Same problem for me. Also running Sublime Merge build 1107.

Screenshot 2019-03-28 at 12 57 52

Git is installed via brew install git Git flow is installed via brew install git-flow (I also tried git-flow-avh) git and git-flow are symlinks in /usr/local/bin pointing to the homebrew cellar.

PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin

Git flow works fine from command line:

$ which git
/usr/local/bin/git
$ which git-flow
/usr/local/bin/git-flow
$ git flow
usage: git flow <subcommand>

Available subcommands are:
   init      Initialize a new git repo with support for the branching model.
   feature   Manage your feature branches.
   release   Manage your release branches.
   hotfix    Manage your hotfix branches.
   support   Manage your support branches.
   version   Shows version information.

Try 'git flow <subcommand> help' for details.

Git flow works fine in Sublime Merge if using the bundled git, but would prefer managing git myself.

masciugo commented 5 years ago

@jskinner that works thanks. I think it should work with the system version too

ian-nisbet commented 5 years ago

Still a problem with system git, or explicitly stating path to git in preferences. git flow works fine on command line.

=== App Version Information === Build: 1116

=== Git Version Information === Using Git: git (system) git version 2.14.3 (Apple Git-98) PATH: /usr/bin:/bin:/usr/sbin:/sbin no output from shell "/bin/bash" in 1000ms

$ which git /usr/local/bin/git

It may be that the PATH reported by sublime-merge does not include the actual path where git-merge is /usr/local/bin/git

How do we add to sublime-merge's PATH?

jwillikers commented 4 years ago

I experienced this issue when switching between the "System" git and MacPorts git & git-flow (/opt/local/bin/git) on macOS 10.15. Sublime Merge Build 1119. The same error message was presented, and I confirmed that the path was set in the settings file for Sublime Merge and that git-flow worked from the command-line. When I quit Sublime Merge and started it fresh, git-flow commands worked properly.

lopsae commented 2 years ago

A possible solution to this issue may be to run smerge from a console where git-flow is setup and available, making Sublime Merge inherit the correct enviroment variables.

The environment variables may not be picked up due to using zsh, and thus using .zprofile instead of .profile.


In my system git-flow is installed with brew and located at:

> which git-flow
/opt/homebrew/bin/git-flow

Git is the system installed one, and Sublime Merge does not set a custom git path so it should point to system too:

> which git
/usr/bin/git

When running Sublime Merge the usual way (clicking on the MacOS Dock or through Finder at the Applications folder) the PATH does is not including the aforementioned git-flow path.

This is part of the Sublime Merge console output when attempting a git flow release, elipsis ([...]) are replacing not pertinent output:

Executing: git flow release start 1.2.1, 
Working dir: [...]
  Env vars: [...] PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/munki:/Library/Apple/usr/bin [...]
Result: failed with exit code 1

When running sublime merge (> smerge) on a console where git-flow is setup and working seems that the PATH is inherited. In that case running a git flow release outputs in the Sublime Merge console:

Executing: git flow release start 1.2.0
Working dir: [...]
  Env vars: [...] PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/munki:/Library/Apple/usr/bin:/opt/homebrew/bin:/opt/homebrew/sbin:[...] [...]
Result: success

And git-flow commands are working!


This was run/using: