File tree Expand file tree Collapse file tree 1 file changed +16
-7
lines changed Expand file tree Collapse file tree 1 file changed +16
-7
lines changed Original file line number Diff line number Diff line change 1- # Yes borrowed from rbenv. Couldn't take my mind off that implementation
2-
3- Gem . post_install do |installer |
1+ module ReshimInstaller
2+ def install ( options )
3+ super
4+ # We don't know which gems were installed, so always reshim.
5+ `asdf reshim ruby`
6+ end
7+ end
48
5- if installer . spec . executables . any? && installer . bin_dir == Gem . default_bindir
6- installer . spec . executables . each do |executable |
7- `asdf reshim ruby #{ RUBY_VERSION } bin/#{ executable } `
9+ if defined? ( Bundler ::Installer )
10+ Bundler ::Installer . prepend ReshimInstaller
11+ else
12+ maybe_reshim = lambda do |installer |
13+ # If any gems with executables were installed or uninstalled, reshim.
14+ if installer . spec . executables . any?
15+ # `asdf reshim ruby`
816 end
917 end
10-
18+ Gem . post_install &maybe_reshim
19+ Gem . post_uninstall &maybe_reshim
1120end
You can’t perform that action at this time.
0 commit comments