Skip to content

Commit

Permalink
feat(golang-rewrite): add 0.16.0 migration notice to old Bash code (#…
Browse files Browse the repository at this point in the history
Stratus3D authored Jan 30, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 5a97e36 commit 4f9a5d3
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions bin/asdf
Original file line number Diff line number Diff line change
@@ -109,6 +109,7 @@ asdf_cmd() {

exec "$ASDF_CMD_FILE" "${@:${args_offset}}"
elif [ -f "$ASDF_CMD_FILE" ]; then
print_0_16_0_migration_notice
set -- "${@:${args_offset}}"
# shellcheck source=/dev/null
. "$ASDF_CMD_FILE"
@@ -122,4 +123,24 @@ asdf_cmd() {
fi
}

print_0_16_0_migration_notice() {
printf -- '\033[1;31m----------
NOTICE:
You have tried to upgrade to asdf 0.16.0 or newer. Versions 0.16.0 is a
complete rewrite of asdf in Go. This text is being printed by the older
Bash implementation. If you are seeing this you have not migrated to
asdf 0.16.0. Please follow the instructions on the upgrade guide to
migrate to the new version.
Aside from this notice, this older Bash implementation works as it did
in asdf version 0.15.0 and older.
Migration guide: https://asdf-vm.com/guide/upgrading-to-v0-16
asdf website: https://asdf-vm.com
Source code: https://github.com/asdf-vm/asdf
\033[0m\n\n' >&2
}

asdf_cmd "$@"

0 comments on commit 4f9a5d3

Please sign in to comment.