diff options
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 18 |
1 files changed, 14 insertions, 4 deletions
@@ -125,10 +125,20 @@ func clone() { badExit(err) } - // update go.sum and go.mod - // todo: only do this if they don't exist? - // todo: make these git commit metadata - pb.RedoGoMod() + if err := pb.ValidGoSum(); err != nil { + // update go.sum and go.mod + if err := pb.RunStrict([]string{"go-mod-clean"}); err != nil { + log.Info("") + log.Info("Do you have go-mod-clean? Otherwise:") + log.Info(" go install go.wit.com/apps/go-mod-clean@latest") + log.Info("") + badExit(err) + } + } + if err := pb.ValidGoSum(); err != nil { + log.Info("could not generate valid go.sum file") + badExit(err) + } // double check it actually downloaded fullgitdir := filepath.Join(forge.GetGoSrc(), argv.Repo, ".git") |
