asdf-ruby
asdf-ruby copied to clipboard
Auto-reshim is broken when using the asdf-alias plugin
I found an interesting asdf edge case I'm not sure how to solve. It's related to the asdf-alias plugin and the auto-reshimming feature of some language plugins like Ruby.
The problem: this hook uses the Ruby constant RUBY_VERSION
, and when the active Ruby version is an alias version (which is a symlink to a concrete version), this results in an incorrect reshim command. For example, when the active version is 3.2
, the executed command is asdf reshim 3.2.0
instead of asdf reshim 3.2
.
Does anyone have a clever idea to work around this from the asdf-ruby side? One option would be to relax the reshim command to reshim all known Ruby versions, but that would be bad for performance.