fix: asdf info show BASH_VERSION & all asdf envs (#1513)

This commit is contained in:
Edwin Kofler 2023-03-26 15:28:16 -07:00 committed by GitHub
parent ec3eb2d64f
commit a1b5eeec1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

View File

@ -4,9 +4,14 @@
info_command() { info_command() {
printf "%s:\n%s\n\n" "OS" "$(uname -a)" printf "%s:\n%s\n\n" "OS" "$(uname -a)"
printf "%s:\n%s\n\n" "SHELL" "$($SHELL --version)" printf "%s:\n%s\n\n" "SHELL" "$("$SHELL" --version)"
printf "%s:\n%s\n\n" "BASH VERSION" "$BASH_VERSION"
printf "%s:\n%s\n\n" "ASDF VERSION" "$(asdf_version)" printf "%s:\n%s\n\n" "ASDF VERSION" "$(asdf_version)"
printf "%s:\n%s\n\n" "ASDF ENVIRONMENT VARIABLES" "$(env | grep -E "ASDF_DIR|ASDF_DATA_DIR|ASDF_CONFIG_FILE|ASDF_DEFAULT_TOOL_VERSIONS_FILENAME")" printf '%s\n' 'ASDF INTERNAL VARIABLES:'
printf 'ASDF_DEFAULT_TOOL_VERSIONS_FILENAME=%s\n' "${ASDF_DEFAULT_TOOL_VERSIONS_FILENAME}"
printf 'ASDF_DATA_DIR=%s\n' "${ASDF_DATA_DIR}"
printf 'ASDF_DIR=%s\n' "${ASDF_DIR}"
printf 'ASDF_CONFIG_FILE=%s\n\n' "${ASDF_CONFIG_FILE}"
printf "%s:\n%s\n\n" "ASDF INSTALLED PLUGINS" "$(plugin_list_command --urls --refs)" printf "%s:\n%s\n\n" "ASDF INSTALLED PLUGINS" "$(plugin_list_command --urls --refs)"
} }

View File

@ -25,8 +25,9 @@ teardown() {
[ "$status" -eq 0 ] [ "$status" -eq 0 ]
[[ $output == *$'OS:\n'* ]] [[ $output == *$'OS:\n'* ]]
[[ $output == *$'SHELL:\n'* ]] [[ $output == *$'SHELL:\n'* ]]
[[ $output == *$'BASH VERSION:\n'* ]]
[[ $output == *$'ASDF VERSION:\n'* ]] [[ $output == *$'ASDF VERSION:\n'* ]]
[[ $output == *$'ASDF ENVIRONMENT VARIABLES:\n'* ]] [[ $output == *$'ASDF INTERNAL VARIABLES:\n'* ]]
[[ $output == *$'ASDF INSTALLED PLUGINS:\n'* ]] [[ $output == *$'ASDF INSTALLED PLUGINS:\n'* ]]
} }