File tree Expand file tree Collapse file tree 1 file changed +15
-8
lines changed Expand file tree Collapse file tree 1 file changed +15
-8
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 |
4-
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 } `
8- end
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`
96 end
7+ end
108
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+ `asdf reshim ruby` if installer . spec . executables . any?
15+ end
16+ Gem . post_install &maybe_reshim
17+ Gem . post_uninstall &maybe_reshim
1118end
You can’t perform that action at this time.
0 commit comments