Closed bkuhlmann closed 3 years ago
Thank you for opening the issue. It is not a bug. frum uses temp dir to switch ruby versions in the following functions.
@bkuhlmann Do you have any reason why you want to see the full path?
Hey Takayuki, yep, it's because of several reasons:
command -v
to discover which directory I need to jump into to open up source code and even manipulate directly.gem pristine
? So if I edit source, but want Ruby Gems to revert the manipulated gem back to it's pristine/original state will that work?command -v
to obtain that information quickly because I needed the exact path to the binary. 😅 command -v
or which
should always report the exact path. Current Frum behavior actually breaks that contract we have all come to be used on on Linux systems.fzf
, bundler
, etc. much easier to dynamically find source locations or compute version comparisons, etc.I hope that helps? There is a lot of power in seeing the exact paths. It also helps keep my mind sane when trying to understand the difference between the temporary folders and what's in Frum cache. Not having a one-ot-one correlation is definitely hard to reason about or even explain to fellow engineers who are not familiar with Frum.
@bkuhlmann
The temp dir frum uses is just a symlink to a specific ruby version directory. So you can see the full path of your Ruby binary like the following workaround. $FRUM_MULTISHELL_PATH
is an environment variable and the path to the Ruby version directory you use. fnm, Node.js version manager written in Rust, also uses temp dir to switch Node.js versions and I created frum referencing fnm.
$ echo "$(readlink $FRUM_MULTISHELL_PATH)/bin/ruby"
It also helps keep my mind sane when trying to understand the different between the temporary folders and what's in Frum cache.
As mentioned above, the temp dir is just a symlink. So there is no difference between them.
Do you think it would be useful to improve frum so that frum can show the fully resolved binary path of the current Ruby version like the following?
$ frum path
=> /Users/foo/.frum/aliases/default/bin/ruby
Takayuki: the temp dir is just a symlink. So there is no difference between them.
Thanks! I will use "$(readlink $FRUM_MULTISHELL_PATH)/bin/ruby"
going forward as that will make documentation much easier for me.
Do you think it would be useful to improve frum so that frum can show the fully resolved binary path of the current Ruby version like the following?
Yeah, I think it would be most welcome. Mainly because it won't be surprising for people using standard inspection tools like command
or which
. Plus, this would match parity with other Ruby Version Managers too and help encourage adoption. :tada:
That's good to hear. Thank you for your opinion!
Overview
When using
command -v
, I noticed Frum is pointing to temporary paths for all Ruby related binaries. I assume this is a bug?Steps to Recreate
Desired Behavior
I would expect to see the full path to where the Frum cache is located. So something more along these lines, for example:
Environment