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

Fix sourcing of asdf.sh #622

Merged
merged 1 commit into from
Nov 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

* [The PostgreSQL Homebrew definition has been fixed](https://github.com/thoughtbot/laptop/pull/612)
* [Return error code for failure sourcing asdf.sh](https://github.com/thoughtbot/laptop/pull/620)
* [Fix for location change of asdf.sh](https://github.com/thoughtbot/laptop/pull/623)

## 2022-03-30

Expand Down
8 changes: 2 additions & 6 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,11 +168,7 @@ add_or_update_asdf_plugin() {
}

# shellcheck disable=SC1091
sh "$(brew --prefix asdf)/asdf.sh"
asdfShExitCode=$?
if [ $asdfShExitCode -ne 0 ]; then
exit $asdfShExitCode
fi
. "$(brew --prefix asdf)/libexec/asdf.sh"
add_or_update_asdf_plugin "ruby" "https://github.com/asdf-vm/asdf-ruby.git"
add_or_update_asdf_plugin "nodejs" "https://github.com/asdf-vm/asdf-nodejs.git"

Expand Down