works more often now

This commit is contained in:
Jeff Carr 2025-02-22 09:43:22 -06:00
parent f078399929
commit 0c5183edf9
1 changed files with 7 additions and 3 deletions

View File

@ -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")