Fix shellcheck errors

This commit is contained in:
Kevin Lane 2019-11-22 10:37:53 -08:00
parent 301cd3db3f
commit d2324e36e7
No known key found for this signature in database
GPG Key ID: 1C86152D9F2E3D7F
2 changed files with 4 additions and 3 deletions

View File

@ -96,7 +96,8 @@ install_tool_version() {
if [ "${version_info[0]}" = "latest" ]; then
load_cmd "latest"
local version=$(latest_command "$plugin_name" "${version_info[1]}")
local version
version=$(latest_command "$plugin_name" "${version_info[1]}")
full_version=$version
else
local version="${version_info[0]}"

View File

@ -7,9 +7,9 @@ latest_command() {
[[ -z $query ]] && query="$DEFAULT_QUERY"
load_cmd "list-all"
echo $(list_all_command "$plugin_name" "$query" \
list_all_command "$plugin_name" "$query" \
| grep -vE "(^Available versions:|-src|-dev|-latest|-stm|[-\.]rc|-alpha|-beta|[-\.]pre|-next|(a|b|c)[0-9]+|snapshot|master)" \
| sed 's/^\s\+//' \
| sort --version-sort \
| tail -1)
| tail -1
}