Skip to content

Commit

Permalink
Improve version filtering error messages and exit codes
Browse files Browse the repository at this point in the history
  • Loading branch information
klane committed Jan 7, 2020
1 parent a453108 commit 7484fcb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions lib/commands/command-latest
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ latest_command() {

if [ -n "${versions}" ]; then
get_latest_version "$versions"
else
exit 1
fi
}

Expand Down
2 changes: 1 addition & 1 deletion lib/commands/command-list-all
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ list_all_command() {
fi

if [ -z "$versions" ]; then
display_error "No compatible versions available"
display_error "No compatible versions available ($plugin_name $query)"
exit 1
fi

Expand Down
2 changes: 1 addition & 1 deletion lib/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ get_latest_version() {
tail -1)

if [ -z "$versions" ]; then
display_error "No compatible versions available"
display_error "No compatible stable versions available"
exit 1
fi

Expand Down

0 comments on commit 7484fcb

Please sign in to comment.