Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion util/semver/constraint.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func (sys System) ParseConstraint(str string) (retC *Constraint, retErr error) {
// creating the empty set, which means the opposite.
lexStr := str
if lexStr == "" {
if sys == NuGet {
if sys == NuGet || sys == Maven {
return nil, fmt.Errorf("invalid empty constraint")
}
lexStr = ">=0.0.0"
Expand Down
1 change: 1 addition & 0 deletions util/semver/maven_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ func TestMavenCanon(t *testing.T) {
}

var mavenConstraintErrorTests = []constraintErrorTest{
{"", "invalid empty constraint"},
{"[", "expected comma or closing bracket in `[`"},
{"()", "hard requirement must be closed on both ends in `()`"},
{")", "unexpected rbracket in `)`"},
Expand Down
Loading