asdf-ruby icon indicating copy to clipboard operation
asdf-ruby copied to clipboard

Auto-reshim is broken when using the asdf-alias plugin

Open ofalvai opened this issue 9 months ago • 0 comments

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.

ofalvai avatar May 21 '24 11:05 ofalvai