File tree Expand file tree Collapse file tree 1 file changed +18
-6
lines changed Expand file tree Collapse file tree 1 file changed +18
-6
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
9+ if defined? ( Bundler ::Installer )
10+ Bundler ::Installer . prepend ReshimInstaller
11+ else
12+ Gem . post_install do |installer |
13+ # Reshim any (potentially) new executables.
614 installer . spec . executables . each do |executable |
7- `asdf reshim ruby #{ RUBY_VERSION } bin/#{ executable } `
15+ `asdf reshim ruby #{ RUBY_VERSION } bin/#{ executable } `
816 end
917 end
10-
18+ Gem . post_uninstall do |installer |
19+ # Unfortunately, reshimming just the removed executables or
20+ # ruby version doesn't work as of 2020/04/23.
21+ `asdf reshim ruby` if installer . spec . executables . any?
22+ end
1123end
You can’t perform that action at this time.
0 commit comments