handle primitive package logic

This commit is contained in:
Jeff Carr 2025-02-12 10:35:50 -06:00
parent 76c327b1f1
commit cfd6046978
1 changed files with 14 additions and 2 deletions

View File

@ -4,6 +4,7 @@ package main
import ( import (
"errors" "errors"
"fmt" "fmt"
"os"
"path/filepath" "path/filepath"
"go.wit.com/log" "go.wit.com/log"
@ -79,8 +80,19 @@ func findNext() bool {
continue continue
} }
if err := testGoDepsCheckOk(godepsNew, argv.Verbose); err != nil { if godepsNew == nil {
log.Info("CHECKING current repo deps failed", err) // don't check godepsNew, but check to make sure go mod tidy actually ran without error
cmd := []string{"go", "mod", "tidy"}
_, err := check.RunVerbose(cmd)
if err != nil {
log.Info("go mod tidy failed. this go package needs to be examined by hand as it doesn't appear to be primitive")
os.Exit(-1)
}
// if godepsNew == nil, then this go package is a primitive and there is no go.sum file
} else {
if err := testGoDepsCheckOk(godepsNew, argv.Verbose); err != nil {
log.Info("CHECKING current repo deps failed", err)
}
continue continue
} }
/* /*