fix: skip borked tags on app list

See #656
This commit is contained in:
2025-10-01 21:13:18 +02:00
parent 4314195dd7
commit 4b4c56d406
2 changed files with 19 additions and 0 deletions

View File

@ -165,6 +165,11 @@ Use "--status/-S" flag to query all servers for the live deployment status.`),
}
for _, update := range updates {
if ok := tagcmp.IsParsable(update); !ok {
log.Debug(i18n.G("unable to parse %s, skipping as upgrade option", update))
continue
}
parsedUpdate, err := tagcmp.Parse(update)
if err != nil {
log.Fatal(err)

View File

@ -15,6 +15,7 @@ teardown_file(){
_undeploy_app
_rm_app
_rm_server
_reset_recipe
if [[ -d "$ABRA_DIR/servers/foo" ]]; then
run rm -rf "$ABRA_DIR/servers/foo"
@ -193,3 +194,16 @@ teardown(){
<(jq -S "." <(echo '{}'))
assert_success
}
# bats test_tags=slow
@test "list ignores borked tags" {
run git -C "$ABRA_DIR/recipes/$TEST_RECIPE" tag \
-a "2.4.8_1" -m "feat: completely borked tag"
assert_success
_deploy_app
run $ABRA app ls --status --debug
assert_success
assert_output --partial "unable to parse 2.4.8_1"
}