diff --git a/parsers/extra/config-version.go b/parsers/extra/config-version.go index 02fc6fa..f037834 100644 --- a/parsers/extra/config-version.go +++ b/parsers/extra/config-version.go @@ -56,6 +56,11 @@ func (p *ConfigVersion) Parse(line string, parts []string, comment string) (stri if len(data) < 2 { return "", &errors.ParseError{Parser: "ConfigVersion", Line: line} } + // version has been already set, first match wins + if p.data != nil { + return "", &errors.ParseError{Parser: "ConfigVersion", Line: line} + } + if version, err := strconv.ParseInt(data[1], 10, 64); err == nil { p.data = &types.ConfigVersion{ Value: version,