You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My GUI git client (GitKraken) cannot find the lefthook executable because it cannot load RVM. After days of searching for a solution, I came across the rc option of lefthook. I created a .lefthookrc file, and try to load RVM within it, but it is still not working.
Has anyone had success with loading RVM in the rc file? Here is what I have (with some debug output). Note that committing from the command line works just fine because RVM and the env variables get loaded correctly. Default shell is ZSH.
echo "~~~~~~~~~~~~~~~~~~~ .LEFTHOOKRC ~~~~~~~~~~~~~~~~~~~"
echo "-- which ruby: $(which ruby)"
echo "-- which lefthook: $(which lefthook)"
export PATH="$PATH:$HOME/.rvm/bin"
# Load RVM into a shell session *as a function*
[ -s "$HOME/.rvm/scripts/rvm" ] && . "$HOME/.rvm/scripts/rvm"
type rvm | head -1
echo "-- which ruby: $(which ruby)"
echo "-- which lefthook: $(which lefthook)"
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
My GUI git client (GitKraken) cannot find the
lefthook
executable because it cannot load RVM. After days of searching for a solution, I came across therc
option of lefthook. I created a .lefthookrc file, and try to load RVM within it, but it is still not working.Has anyone had success with loading RVM in the rc file? Here is what I have (with some debug output). Note that committing from the command line works just fine because RVM and the env variables get loaded correctly. Default shell is ZSH.
Beta Was this translation helpful? Give feedback.
All reactions