works more often now
This commit is contained in:
parent
f078399929
commit
0c5183edf9
10
clone.go
10
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")
|
||||
|
|
Loading…
Reference in New Issue