Skip to content

Commit

Permalink
Replace separator in NotSatisfiable error
Browse files Browse the repository at this point in the history
Use new line instead of comma as a separator.

Signed-off-by: Mikalai Radchuk <mradchuk@redhat.com>
  • Loading branch information
m1kola authored and everettraven committed Nov 13, 2023
1 parent 0a012d2 commit ddaf504
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions internal/solver/solve_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func TestNotSatisfiableError(t *testing.T) {
Constraint: constraint.Mandatory(),
},
},
String: fmt.Sprintf("constraints not satisfiable: %s",
String: fmt.Sprintf("constraints not satisfiable:\n%s",
constraint.Mandatory().String("a")),
},
{
Expand All @@ -80,7 +80,7 @@ func TestNotSatisfiableError(t *testing.T) {
Constraint: constraint.Prohibited(),
},
},
String: fmt.Sprintf("constraints not satisfiable: %s, %s",
String: fmt.Sprintf("constraints not satisfiable:\n%s\n%s",
constraint.Mandatory().String("a"), constraint.Prohibited().String("b")),
},
} {
Expand Down
2 changes: 1 addition & 1 deletion pkg/deppy/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func (e NotSatisfiable) Error() string {
for i, a := range e {
s[i] = a.String()
}
return fmt.Sprintf("%s: %s", msg, strings.Join(s, ", "))
return fmt.Sprintf("%s:\n%s", msg, strings.Join(s, "\n"))
}

// Identifier values uniquely identify particular Variables within
Expand Down

0 comments on commit ddaf504

Please sign in to comment.