Skip to content

Commit

Permalink
Fix sourcing of asdf.sh
Browse files Browse the repository at this point in the history
Installing asdf via Homebrew now says:

```
To use asdf, add the following line to your ~/.zshrc:
  . /opt/homebrew/opt/asdf/libexec/asdf.sh
```

Yes, the laptop script is doing:

`. /opt/homebrew/opt/asdf/asdf.sh`

This used to work, but in no longer does because of the change in
Homebrew/homebrew-core#81664

This corrects the file location being source.

This failure was showing in CI and UTM locally for me.
  • Loading branch information
cpytel committed Nov 3, 2022
1 parent 3f16c31 commit ab444b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mac
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ brew link --force heroku
fancy_echo "Configuring asdf version manager ..."
if [ ! -d "$HOME/.asdf" ]; then
brew install asdf
append_to_zshrc "source $(brew --prefix asdf)/asdf.sh" 1
append_to_zshrc "source $(brew --prefix asdf)/libexec/asdf.sh" 1
fi

alias install_asdf_plugin=add_or_update_asdf_plugin
Expand All @@ -168,7 +168,7 @@ add_or_update_asdf_plugin() {
}

# shellcheck disable=SC1091
sh "$(brew --prefix asdf)/asdf.sh"
sh "$(brew --prefix asdf)/libexec/asdf.sh"
asdfShExitCode=$?
if [ $asdfShExitCode -ne 0 ]; then
exit $asdfShExitCode
Expand Down

0 comments on commit ab444b7

Please sign in to comment.