Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions templates/hooks/commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ fi

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

# If this script is being run from a non interactive shell
# (i.e. from within RubyMine) then we might need to
# detect and initialise rbenv.
if [ -d $HOME/.rbenv ]; then
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
fi

# Use bundler if fit-commit was installed using it
# or find appropriate Ruby command
if bundle show fit-commit > /dev/null 2>&1; then
Expand Down