Add check if $latest is empty

This commit is contained in:
Clémentine Urquizar 2021-10-16 17:36:36 +02:00
parent e4cb7ed30f
commit 93ad8f04b5
No known key found for this signature in database
GPG Key ID: D8E7CC7422E77E1A

View File

@ -179,6 +179,13 @@ failure_usage() {
# MAIN
latest="$(get_latest)"
if [ "$latest" = '' ]; then
echo ''
echo 'Impossible to get the latest stable version of MeiliSearch.'
echo 'Please let us know about this issue: https://github.com/meilisearch/meilisearch-swift/issues/new/choose'
exit 1
fi
if ! get_os; then
failure_usage
exit 1