Skip to content
This repository has been archived by the owner on Oct 1, 2022. It is now read-only.

Only execute rbenv rehash if the shims directory is writable #9

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
7 changes: 5 additions & 2 deletions rubygems_plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@
end
end

Gem.post_install(&hook)
Gem.post_uninstall(&hook)
shims_path = File.join(ENV['RBENV_ROOT'], "shims")
if File.writable?(shims_path)
Gem.post_install(&hook)
Gem.post_uninstall(&hook)
end