diff options
| -rw-r--r-- | cleanGoSum.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cleanGoSum.go b/cleanGoSum.go index ec4c981..85abac7 100644 --- a/cleanGoSum.go +++ b/cleanGoSum.go @@ -8,6 +8,7 @@ import ( "sort" "strings" + "go.wit.com/lib/protobuf/forgepb" "go.wit.com/lib/protobuf/gitpb" "go.wit.com/log" ) @@ -64,8 +65,11 @@ func cleanGoDepsCheckOk(check *gitpb.Repo) error { depRepo.GetVersion(), found.GetMasterVersion(), ends) errs := fmt.Sprintf("%s error %s vs %s %s", depRepo.GetGoPath(), depRepo.GetVersion(), found.GetMasterVersion(), ends) - cmd := []string{"go", "get", depRepo.GetGoPath() + "@" + found.GetMasterVersion()} - fixes = append(fixes, cmd) + if ok, _ := forgepb.ValidGoVersion(found.GetMasterVersion()); ok { + // can't go get invalid version numbers + cmd := []string{"go", "get", depRepo.GetGoPath() + "@" + found.GetMasterVersion()} + fixes = append(fixes, cmd) + } err = errors.New(errs) } } |
