summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--findNext.go16
1 files changed, 14 insertions, 2 deletions
diff --git a/findNext.go b/findNext.go
index 388336e..6f4cd25 100644
--- a/findNext.go
+++ b/findNext.go
@@ -4,6 +4,7 @@ package main
import (
"errors"
"fmt"
+ "os"
"path/filepath"
"go.wit.com/log"
@@ -79,8 +80,19 @@ func findNext() bool {
continue
}
- if err := testGoDepsCheckOk(godepsNew, argv.Verbose); err != nil {
- log.Info("CHECKING current repo deps failed", err)
+ if godepsNew == nil {
+ // 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
}
/*