Skip to content

Commit 3310dba

Browse files
committed
fixup! modules can declare zero version requirements
1 parent b54d506 commit 3310dba

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

internal/config/moduleconfig/module_config.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package moduleconfig
22

33
import (
4+
"errors"
45
"fmt"
56
"io/ioutil"
67
"log"
@@ -136,7 +137,11 @@ func LoadModuleConfig(filePath string) (ModuleConfig, error) {
136137

137138
log.Fatal("")
138139
}
139-
// ValidateZeroVersion(config)
140+
141+
if !ValidateZeroVersion(config) {
142+
constraint := config.ZeroVersion.Constraints.String()
143+
return config, errors.New(fmt.Sprintf("Module's zero requirement not satisfied: expected %s received: %s", constraint, version.AppVersion))
144+
}
140145
return config, nil
141146
}
142147

0 commit comments

Comments
 (0)