Skip to content
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: no such file or directory /opt/homebrew/opt/asdf/libexec/asdf.sh #1968

Open
znorris opened this issue Feb 17, 2025 · 5 comments
Open

bug: no such file or directory /opt/homebrew/opt/asdf/libexec/asdf.sh #1968

znorris opened this issue Feb 17, 2025 · 5 comments
Labels

Comments

@znorris
Copy link

znorris commented Feb 17, 2025

Describe the Bug

I've been using asdf integrated in .zshrc for as long as I've had this laptop. However, now I'm suddenly getting an error. The previous bug reports I see are either not zsh related or seem to imply I did something wrong while installing. However, it has been working without issue for some time. I don't see this particular issue listed in the breaking changes for https://github.com/asdf-vm/asdf/releases/tag/v0.16.0 https://asdf-vm.com/guide/upgrading-to-v0-16.html#breaking-changes

Steps to Reproduce

  1. Have asdf installed via homebrew
  2. Ensure zsh and asdf are working as expected
  3. ??? (brew upgrade might have happened)
  4. Open a new terminal

Expected Behaviour

No errors. Better backwards compatibility.

Actual Behaviour

~/.zshrc:.:26: no such file or directory: /opt/homebrew/opt/asdf/libexec/asdf.sh

Environment

OS:
Darwin glitch-book.local 24.3.0 Darwin Kernel Version 24.3.0: Thu Jan  2 20:24:24 PST 2025; root:xnu-11215.81.4~3/RELEASE_ARM64_T6030 arm64

SHELL:
zsh 5.9 (arm64-apple-darwin24.0)

BASH VERSION:
3.2.57(1)-release

ASDF VERSION:
0.16.2

ASDF INTERNAL VARIABLES:
ASDF_DEFAULT_TOOL_VERSIONS_FILENAME=.tool-versions
ASDF_DATA_DIR=~/.asdf
ASDF_CONFIG_FILE=~/.asdfrc

ASDF INSTALLED PLUGINS:
elixir    https://github.com/asdf-vm/asdf-elixir.git a4c42e10a7681afd4c87da144e9667865d5034c6
erlang    https://github.com/asdf-vm/asdf-erlang.git cf6ac67d6c255eedb1595ba2c4ce411c6f521b64

asdf plugins affected (if relevant)

No response

@znorris znorris added the bug label Feb 17, 2025
@Natan5533
Copy link

Natan5533 commented Feb 17, 2025

I'm having the same problem here after a brew upgrade , trying to understand what's wrong, but still no luck.

@donni106
Copy link

donni106 commented Feb 18, 2025

The issue over here seems to help out #1895 (comment).
Worked well for me on macOS with zsh.

@robinvw1
Copy link

You need to replace /opt/homebrew/opt/asdf/libexec/asdf.sh. This worked for me in ~/.zshrc:

# asdf
export PATH="${ASDF_DATA_DIR:-$HOME/.asdf}/shims:$PATH"

This is also listed here: https://asdf-vm.com/guide/upgrading-to-v0-16.html#_3-add-asdf-data-dir-shims-to-the-front-of-your-path


The only thing that's not working for me yet is asdf + pre-commit hooks + Husky.

I used to also load asdf.sh in ~/.huskyrc, like this blog post explained: https://jonrh.is/using-husky-and-asdf-with-fork.

@znorris
Copy link
Author

znorris commented Feb 18, 2025

With asdf being in alpha for years and no change in sight, I think the solution for me is just to uninstall it and go about managing Elixir and Erlang in another way. Though, I appreciate the help of you all on this thread.

@ghobolds
Copy link

@robinvw1 Have you found a solution for using asdf 0.16.xx with pre-commit hooks + husky?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants