diff --git a/clone.go b/clone.go index 40fa016..f3d05cf 100644 --- a/clone.go +++ b/clone.go @@ -32,6 +32,7 @@ func clone(gopath string) (*gitpb.Repo, error) { return nil, err } + autoWork() if err := makeValidGoSum(pb); err != nil { return nil, err } @@ -107,13 +108,16 @@ func makeValidGoSum(check *gitpb.Repo) error { // attempt to grab the notes check.RunQuiet([]string{"git", "fetch", "origin", "refs/notes/*:refs/notes/*"}) - if check.ParseGoSum() { - return nil + if err := check.RunVerbose([]string{"forge", "list"}); 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("") } log.Info("try running go-mod-clean") // update go.sum and go.mod - if _, err := check.RunVerboseOnError([]string{"go-mod-clean"}); err != nil { + if err := check.RunVerbose([]string{"go-mod-clean", "--smart"}); 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")