From 9b48ce92374ce1835f2e68672118b3db329a38ff Mon Sep 17 00:00:00 2001 From: Nathan Rijksen Date: Thu, 5 Oct 2023 10:29:28 -0700 Subject: [PATCH] Fix user facing error not suggesting alternate branches if there's only one alternative --- internal/runbits/runtime/rationalize.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/runbits/runtime/rationalize.go b/internal/runbits/runtime/rationalize.go index 38ede373f7..b12c78d673 100644 --- a/internal/runbits/runtime/rationalize.go +++ b/internal/runbits/runtime/rationalize.go @@ -27,7 +27,7 @@ func rationalizeError(auth *authentication.Auth, proj *project.Project, rerr *er // Could not find a platform that matches on the given branch, so suggest alternate branches if ones exist case isUpdateErr && errors.As(*rerr, &errNoMatchingPlatform): branches, err := model.BranchNamesForProjectFiltered(proj.Owner(), proj.Name(), proj.BranchName()) - if err == nil && len(branches) > 1 { + if err == nil && len(branches) > 0 { // Suggest alternate branches *rerr = errs.NewUserFacingError(locale.Tr( "err_alternate_branches",