This commit is contained in:
Jeff Carr 2024-12-03 18:03:54 -06:00
parent 18905d7cf7
commit 97a2f05cf2
3 changed files with 3 additions and 3 deletions

View File

@ -52,7 +52,7 @@ func (repo *Repo) RedoGoMod() (bool, error) {
repo.GoDeps = new(GoDeps) repo.GoDeps = new(GoDeps)
repo.GoPrimitive = false repo.GoPrimitive = false
ok, err := repo.isPrimativeGoMod() ok, err := repo.IsPrimitive()
if err != nil { if err != nil {
// this means this repo does not depend on any other package // this means this repo does not depend on any other package
log.Info("PRIMATIVE repo error:", repo.GoPath, "err =", err) log.Info("PRIMATIVE repo error:", repo.GoPath, "err =", err)
@ -121,7 +121,6 @@ func (repo *Repo) PublishedLen() int {
// returns true if the last published // returns true if the last published
func (all *Repos) GoDepsChanged(repo *Repo) (bool, error) { func (all *Repos) GoDepsChanged(repo *Repo) (bool, error) {
var upgrade bool = false var upgrade bool = false
if repo.GoDeps == nil { if repo.GoDeps == nil {
repo.RedoGoMod() repo.RedoGoMod()
} }

View File

@ -16,7 +16,7 @@ import (
// will return true if the repo is truly not dependent on _anything_ else // will return true if the repo is truly not dependent on _anything_ else
// like spew or lib/widget // like spew or lib/widget
// it assumes go mod ran init and tidy ran without error // it assumes go mod ran init and tidy ran without error
func (repo *Repo) isPrimativeGoMod() (bool, error) { func (repo *Repo) IsPrimitive() (bool, error) {
// go mod init & go mod tidy ran without errors // go mod init & go mod tidy ran without errors
log.Log(GITPB, "isPrimativeGoMod()", repo.FullPath) log.Log(GITPB, "isPrimativeGoMod()", repo.FullPath)
tmp := filepath.Join(repo.FullPath, "go.mod") tmp := filepath.Join(repo.FullPath, "go.mod")

View File

@ -60,6 +60,7 @@ func (repo *Repo) Exists(filename string) bool {
testf := filepath.Join(repo.FullPath, filename) testf := filepath.Join(repo.FullPath, filename)
_, err := os.Stat(testf) _, err := os.Stat(testf)
if err != nil { if err != nil {
log.Warn("gitpb: Exists() failed for", testf)
return false return false
} }
return true return true