fix: plugin test to emit error message when latest fails (#772)

Fix #756
This commit is contained in:
Daniel Perez 2020-08-10 04:27:35 +01:00 committed by GitHub
parent f09532478b
commit 1a01356935
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -110,6 +110,9 @@ plugin_test_command() {
# version from the versions list
if [ -z "$tool_version" ] || [[ "$tool_version" == *"latest"* ]]; then
version="$(asdf latest "$plugin_name" "$(echo "$tool_version" | sed -e 's#latest##;s#^:##')")"
if [ -z "$tool_version" ]; then
fail_test "could not get latest version"
fi
else
version="$tool_version"
fi