1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-02 22:58:01 +00:00

Add Fix Shim Path After asdf Upgrade as a Unix TIL

This commit is contained in:
jbranchaud
2025-02-17 10:31:58 -06:00
parent 0a0a509827
commit 14e6635383
2 changed files with 36 additions and 1 deletions

View File

@@ -10,7 +10,7 @@ pairing with smart people at Hashrocket.
For a steady stream of TILs, [sign up for my newsletter](https://crafty-builder-6996.ck.page/e169c61186).
_1591 TILs and counting..._
_1592 TILs and counting..._
See some of the other learning resources I work on:
- [Ruby Operator Lookup](https://www.visualmode.dev/ruby-operators)
@@ -1531,6 +1531,7 @@ See some of the other learning resources I work on:
- [Find Newer Files](unix/find-newer-files.md)
- [Find Occurrences Of Multiple Values With Ripgrep](unix/find-occurrences-of-multiple-values-with-ripgrep.md)
- [Find Top-Level Directories Matching A Pattern](unix/find-top-level-directories-matching-a-pattern.md)
- [Fix Shim Path After asdf Upgrade](unix/fix-shim-path-after-asdf-upgrade.md)
- [Fix Unlinked Node Binaries With asdf](unix/fix-unlinked-node-binaries-with-asdf.md)
- [Forward Multiple Ports Over SSH](unix/forward-multiple-ports-over-ssh.md)
- [Generate A SAML Key And Certificate Pair](unix/generate-a-saml-key-and-certificate-pair.md)

View File

@@ -0,0 +1,34 @@
# Fix Shim Path After asdf Upgrade
While doing [`brew install groff`](aws/aws-cli-requires-groff-executable.md),
Homebrew decided to upgrade every last thing it knows about on my machine,
including `asdf`.
`asdf` has undergone some big recent changes, including [a rewrite in
Go](https://stratus3d.com/blog/2025/02/03/asdf-has-been-rewritten-in-go/).
I noticed that `asdf` wasn't picking up my specified tool versions. I tried an
`asdf reshim`, but that didn't do the trick. Someone else wrote that [asdf
seems broken after homebrew
upgrade](https://braytonium.com/2023/01/09/asdf-seems-broken-after-homebrew-upgrade/)
which gave some hints and pointed me to some interesting GitHub issues.
Additionally, I noticed when opening a fresh terminal session the following error from `zsh`:
```bash
/Users/jbranchaud/.zshrc:.:225: no such file or directory: /usr/local/opt/asdf/libexec/asdf.sh
```
That directory and file is gone. So, how does `asdf` now want you to configure
its path with `zsh`? Revisiting their updated docs, I can see that the instead
of sourcing that shell script, we should now export shims to the path:
```bash
# . /usr/local/opt/asdf/libexec/asdf.sh
export PATH="${ASDF_DATA_DIR:-$HOME/.asdf}/shims:$PATH"
```
Updating my `.zshrc` to the above and then reloading did the trick. My tool
versions are registering now.
[source](https://asdf-vm.com/guide/getting-started.html#_2-configure-asdf)