diff --git a/internal/importers/govendor/importer.go b/internal/importers/govendor/importer.go index 92be7c34bc..44ae970c56 100644 --- a/internal/importers/govendor/importer.go +++ b/internal/importers/govendor/importer.go @@ -101,11 +101,8 @@ func (g *Importer) convert(pr gps.ProjectRoot) (*dep.Manifest, *dep.Lock, error) return nil, nil, err } - // Revision must not be empty - if pkg.Revision == "" { - err := errors.New("invalid govendor configuration, Revision is required") - return nil, nil, err - } + // There are valid govendor configs in the wild that don't have a revision set + // so we are not requiring it to be set during import ip := base.ImportedPackage{ Name: pkg.Path, diff --git a/internal/importers/govendor/importer_test.go b/internal/importers/govendor/importer_test.go index ec5186fa52..93553d6a7b 100644 --- a/internal/importers/govendor/importer_test.go +++ b/internal/importers/govendor/importer_test.go @@ -124,7 +124,7 @@ func TestGovendorConfig_Convert(t *testing.T) { WantConvertErr: true, }, }, - "missing package revision": { + "missing package revision doesn't cause an error": { govendorFile{ Package: []*govendorPackage{ { @@ -133,7 +133,7 @@ func TestGovendorConfig_Convert(t *testing.T) { }, }, importertest.TestCase{ - WantConvertErr: true, + WantConstraint: "*", }, }, }