Skip to content

Commit

Permalink
Merge pull request #33 from yasn77/use_bundler
Browse files Browse the repository at this point in the history
Use bundler if fit-commit was installed using it
  • Loading branch information
m1foley authored Jan 8, 2017
2 parents d18d5c8 + 059aa17 commit f30184b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions templates/hooks/commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@ fi

export GIT_BRANCH_NAME=`git symbolic-ref --short HEAD 2> /dev/null`

# find appropriate Ruby command
if which rbenv > /dev/null 2>&1; then
# Use bundler if fit-commit was installed using it
# or find appropriate Ruby command
if bundle show fit-commit > /dev/null 2>&1; then
cmd="bundle exec ruby"
elif which rbenv > /dev/null 2>&1; then
cmd="rbenv exec ruby"
elif which ruby-rvm-env > /dev/null 2>&1; then
cmd="ruby-rvm-env"
Expand Down

0 comments on commit f30184b

Please sign in to comment.