Skip to content

Commit

Permalink
Fix user facing error not suggesting alternate branches if there's on…
Browse files Browse the repository at this point in the history
…ly one alternative
  • Loading branch information
Naatan committed Oct 5, 2023
1 parent d657e19 commit 9b48ce9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/runbits/runtime/rationalize.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 9b48ce9

Please sign in to comment.