-
Notifications
You must be signed in to change notification settings - Fork 861
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: Error after updating to 0.16.1 using Homebrew and fish shell #1895
Comments
The location of the file
I also had to modify the file
|
Adding
to my ~/.bashrc and removing
from https://asdf-vm.com/guide/upgrading-to-v0-16.html#_3-add-asdf-data-dir-shims-to-the-front-of-your-path helped. Plus
to reshim all existing commands due to:
|
The fix outlined by @thomas-merz works for ZSH as well Thank you! |
Thanks all. Based on @dhoppe's comment, I made the following changes. I'm guessing these will resolve Homebrew + fish shell users' similar problems. - source (brew --prefix asdf)/libexec/asdf.fish
+ source (brew --prefix asdf)/share/fish/vendor_completions.d/asdf.fish
+ # ASDF configuration code
+ if test -z $ASDF_DATA_DIR
+ set _asdf_shims "$HOME/.asdf/shims"
+ else
+ set _asdf_shims "$ASDF_DATA_DIR/shims"
+ end
+
+ # Do not use fish_add_path (added in Fish 3.2) because it
+ # potentially changes the order of items in PATH
+ if not contains $_asdf_shims $PATH
+ set -gx --prepend PATH $_asdf_shims
+ end
+ set --erase _asdf_shims Thanks @Stratus3D and other contributors to And for what it's worth, my |
The same problem with Zsh |
|
@azat-io I experienced the same and wrote how I fixed it in #785 (comment) |
I made the changes in @crcastle last post and it got me rid of the original error with the file not being in the expected location, but I am now getting a lot of these:
I am getting these for all subcommands with spaces, such as I have tried refreshing the completions with |
@gtnbssn yep, sadly, the 0.16.2 release from yesterday (or the day before?) broke with the changes that I recommended above to fix the 0.16.1 release. 🫠 I haven't had time to look into the details or fix it, so I just disabled command completion for now. In - source (brew --prefix)/opt/asdf/share/fish/vendor_completions.d/asdf.fish
+ #source (brew --prefix)/opt/asdf/share/fish/vendor_completions.d/asdf.fish Looks like your's might be different, but you should similarly be able to just comment out the line that loads the completions. |
Related to new 0.16.0 executable? |
Added to config.fish set --export ASDF_DATA_DIR $HOME/.asdf
fish_add_path --prepend $ASDF_DATA_DIR/shims and then
|
I had to use fish_add_path --move $ASDF_DATA_DIR/shims |
Describe the Bug
I receive the following error before every shell prompt and when I open a new shell:
It looks like maybe this is a breaking change when going from 0.15 to 0.16? The Getting Started instructions for pre-0.16.0 page says to use the following to install asdf, which I did when I installed it a long time ago.
Should I now remove that source line? I do not see a
libexec
directory in/opt/homebrew/opt/asdf/
after runningbrew upgrade
today.Apologies if I missed it, but I didn't see any instructions to change or remove that line in the Upgrading to 0.16.0 page.
Steps to Reproduce
echo -e "\nsource "(brew --prefix asdf)"/libexec/asdf.fish" >> ~/.config/fish/config.fish
brew upgrade
.asdf version
to ensure you now have a version >= 0.16.0.Expected Behaviour
No error on prompt or when starting a new shell.
Actual Behaviour
Errors on every prompt and when starting a new shell. For example:
Environment
❯ asdf info OS: Darwin cheddar.local 24.3.0 Darwin Kernel Version 24.3.0: Thu Jan 2 20:24:16 PST 2025; root:xnu-11215.81.4~3/RELEASE_ARM64_T6000 arm64 SHELL: fish, version 3.7.1 BASH VERSION: 5.2.37(1)-release ASDF VERSION: 0.16.1 ASDF INTERNAL VARIABLES: ASDF_DEFAULT_TOOL_VERSIONS_FILENAME=.tool-versions ASDF_DATA_DIR=/Users/crcastle/.asdf ASDF_CONFIG_FILE=/Users/crcastle/.asdfrc ASDF INSTALLED PLUGINS: crystal https://github.com/asdf-community/asdf-crystal.git 6b5c52ad42c176f9415bf00cceec2d825d1ff92b deno https://github.com/asdf-community/asdf-deno.git fec2a081b00f98490bdff9aa0cbe04bc313a8639 golang https://github.com/kennyp/asdf-golang.git 0e86b1d5a7b2bf9ce39fc43b0ff6a744eaa269b8 nodejs https://github.com/asdf-vm/asdf-nodejs.git c5b7c40ea9ffc3470f44b6cf04a21e45dd6f81de ruby https://github.com/asdf-vm/asdf-ruby.git 37e32d1fc28a69173fba7f9a5ea434900cc36c1b
asdf plugins affected (if relevant)
No response
The text was updated successfully, but these errors were encountered: