Skip to content

Detect and initialise Rubymine to support running within non-interactive shells #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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