New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: asdf 0.10.1 can't find the commands directory on linux or macos using homebrew and fish #1231
Comments
I just installed the latest version via homebrew as well and am getting a similar error:
In my setup, I am using zsh, and the error above happens upon sourcing my |
Looks like my desktop on macOS just upgraded to 0.10.1 this morning homebrew install
and now i'm getting the same error
|
Thanks for reporting. Is there anyway for you to downgrade to version For reference, here is the list of changes in |
In macOS environment, it seems like there might be some kind of version number mismatch internally; after upgradeing to
Setting # ~/.config/fish/config.fish
set -x ASDF_DIR '/opt/homebrew/Cellar/asdf/0.10.1/libexec'
source /opt/homebrew/opt/asdf/libexec/asdf.fish |
I don't think there is a way to downgrade using homebrew, unless they are setup in a versioned way. Typically I'd try to install a lower version like this My previous config.fish was set to do this
Looks like according to the latest instructions that that might be outdated. I don't have my homebrew installed anymore to check though. I just changed my installation to install from git instead of homebrew and it seemed to work well. |
For the record, I run I didn't dig further and changed my installation too to install from git and it worked well. |
If anyone is familiar with Homebrew the formula is here - https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/asdf.rb. I don't see any obvious issues there. |
I've found a temporary workaround:
@Stratus3D I haven't found the commit that caused it, but the issue stems from "hard-generating" the path to asdf installation and the path itself contains version number. For example:
So whenever you upgrade asdf from brew, If I understand the logic in reshim.bash, this part right here doesn't check if the directory is still valid: One way to fix this is to switch from generating fixed prefix ( |
@Stratus3D wouldn't it makes sense to change Line 100 in 788ccab
We still need to forcefully reshim all shims with new release for this to take place. |
Switch from generating static paths to asdf exec file to using user's ASDF_DIR env variable to dynamically determine asdf location. It ensures that regardless of updates for asdf installed on user system path won't rely on single correct path to asdf. Since the path might contain version number (e. g. `/opt/homebrew/Cellar/asdf/0.9.0/libexec/bin/asdf`), asdf installation would break as soon as new release is installed. Fixes asdf-vm#1231
I got the same issue, seems like shims are not updated properly when using brew since the versions is captured in the path. Using
Running
To fix I had to
|
I encountered the similar error when I updated to 0.10.2 via Homebrew.
|
I'm having the same issue on OS X and running |
Dupe of #1115. Think they're trying to use that as the main issue. |
It's seems a error with the new versions of
And solved by adding this to my
And then:
|
Co-authored-by: James Hegedus <jthegedus@hey.com> Fixes asdf-vm#1115 Fixes asdf-vm#1231 Fixes asdf-vm#1286
In fish shell, remove
|
Describe the Bug
I just installed asdf through homebrew on linux using the fish shell. When I run
asdf
it tells me thisthe lib directory just has two files in it, no subdirectories.
ls -l /home/linuxbrew/.linuxbrew/opt/asdf/lib/
I can tell that
/home/linuxbrew/.linuxbrew/opt/asdf/libexec/lib
has acommands
directory, but it's not looking in the libexec subfolder.I can get this to work by editing
libexec/bin/asdf
adding libexec to the asdf_cmd_dir
and then editing
libexec/lib/commands/command-help.bash
adding libexec to the help.txt path
and then editing
libexec/lib/utils.bash
adding libexec to the version.txt path
Steps to Reproduce
Expected Behaviour
it should execute the asdf command
Actual Behaviour
returns this error
Environment
(asdf isn't working)
asdf plugins affected (if relevant)
(none)
The text was updated successfully, but these errors were encountered: