mirror of
https://github.com/asdf-vm/asdf.git
synced 2024-11-15 01:28:17 -07:00
Add mechanism to disable the update command since it will not work when asdf is installed via brew.
This commit is contained in:
parent
252ee6a608
commit
84ad80f575
@ -4,6 +4,17 @@ update_command() {
|
||||
(
|
||||
cd $(asdf_dir)
|
||||
|
||||
if [ -f asdf_updates_disabled ]; then
|
||||
echo "Update command disabled. Please use the package manager that you used to install asdf to upgrade asdf."
|
||||
else
|
||||
do_update "$update_to_head"
|
||||
fi
|
||||
)
|
||||
}
|
||||
|
||||
do_update() {
|
||||
local update_to_head=$1
|
||||
|
||||
if [ "$update_to_head" = "--head" ]; then
|
||||
# Update to latest on the master branch
|
||||
git checkout master
|
||||
@ -20,7 +31,6 @@ update_command() {
|
||||
git checkout "$tag" || exit 1
|
||||
echo "Updated asdf to release $tag"
|
||||
fi
|
||||
)
|
||||
}
|
||||
|
||||
# stolen from https://github.com/rbenv/ruby-build/pull/631/files#diff-fdcfb8a18714b33b07529b7d02b54f1dR942
|
||||
|
Loading…
Reference in New Issue
Block a user