I don't know, whetther it is rbenv of git-flow problem, but when I try to run
git flow release finish 0.1.0
there is a problem, mentioning rbenv:
Switched to branch 'production'
/Users/alsemyonov/.rbenv/libexec/rbenv-version-file-read: line 16: syntax error near unexpected token `<'
Deleted branch release/0.1.0 (was 1234567).
And periodically it causes git-flow commands to fail.
When I try something like:
git flow feature start my-cool-feature
Switched to a new branch 'feature/my-cool-feature'
/usr/local/Cellar/rbenv/0.3.0/libexec/rbenv-version-file-read: line 16: syntax error near unexpected token `<'
Could not create feature branch 'feature/my-cool-feature'
At least in my case this is due to a post-checkout hook that calls bundle. Removing the automatic execution of bundle fixed it for the time being.
avoid process substitution
It might not be supported by a lot of shells. This is the only occurence
of process substitution in this project, and the issue #222 ()
mentions a strange syntax error in this file.
It might be that your shells don't support process substitution. It's the only occurence of process substitution used in rbenv. I just changed it to use a simple pipeline. I'll submit a pull request.
Sounds reasonable to me. Git flow uses sh under the hood.
Can you share with us your post-checkout hook that calls bundle? I'm wondering what's going on here
And sorry for not getting onto this until this late. Let's fix it if there's a bug!
.git/hooks/ctags >/dev/null 2>&1 &
if [ $1 != 0000000000000000000000000000000000000000 ]; then
if command -v hookup >/dev/null; then
hookup post-checkout "$@"
elif [ $3 = 1 -a -f Gemfile ] && command -v bundle >/dev/null &&
git diff --name-only $1 $2 | egrep -q '^Gemfile|\.gemspec$'
(unset GIT_DIR; exec bundle) | grep -v '^Using ' | grep -v ' is complete'
Can't reproduce this! Very strange
Managed to reproduce, and filed as nvie/gitflow#289
There is no workaround apart from manually editing the git-flow executable and removing the offending line.