File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66
77## [Unreleased]
88
9+ ## 2025-06-25
10+
11+ * asdf is now updated if it is already installed and asdf commands were updated
12+ to work with latest versions.
13+
914## 2024-09-24
1015
1116* Support for macOS Sequoia
Original file line number Diff line number Diff line change @@ -168,17 +168,19 @@ fancy_echo "Configuring asdf version manager ..."
168168if [ ! -d " $HOME /.asdf" ]; then
169169 brew install asdf
170170 append_to_zshrc " source $( brew --prefix asdf) /libexec/asdf.sh" 1
171+ else
172+ brew upgrade asdf
171173fi
172174
173175alias install_asdf_plugin=add_or_update_asdf_plugin
174176add_or_update_asdf_plugin () {
175177 local name=" $1 "
176178 local url=" $2 "
177179
178- if ! asdf plugin- list | grep -Fq " $name " ; then
179- asdf plugin- add " $name " " $url "
180+ if ! asdf plugin list | grep -Fq " $name " ; then
181+ asdf plugin add " $name " " $url "
180182 else
181- asdf plugin- update " $name "
183+ asdf plugin update " $name "
182184 fi
183185}
184186
@@ -190,11 +192,11 @@ add_or_update_asdf_plugin "nodejs" "https://github.com/asdf-vm/asdf-nodejs.git"
190192install_asdf_language () {
191193 local language=" $1 "
192194 local version
193- version=" $( asdf list- all " $language " | grep -v " [a-z]" | tail -1) "
195+ version=" $( asdf list all " $language " | grep -v " [a-z]" | tr -s ' \n ' | tail -1) "
194196
195197 if ! asdf list " $language " | grep -Fq " $version " ; then
196198 asdf install " $language " " $version "
197- asdf global " $language " " $version "
199+ asdf set --home " $language " " $version "
198200 fi
199201}
200202
You can’t perform that action at this time.
0 commit comments