From 2a47f1e547d2cda3d85d5e6c8c78a663b139fc9f Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sat, 13 Sep 2025 05:33:31 -0500 Subject: cleaning up obscure git cases --- currentVersions.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'currentVersions.go') diff --git a/currentVersions.go b/currentVersions.go index fdedb74..48563f9 100644 --- a/currentVersions.go +++ b/currentVersions.go @@ -38,7 +38,6 @@ func (repo *Repo) setMasterVersion() { repo.MasterVersion = v } else { log.Log(WARN, "gitpb.GitMasterVersion() error:", err) - repo.MasterVersion = "giterr" } } @@ -134,11 +133,11 @@ func (repo *Repo) gitVersionByName(name string) (string, error) { if name == "" { // git will return the current tag - r, err := repo.RunQuiet([]string{"git", "describe", "--tags"}) + cmd := []string{"git", "describe", "--tags"} + r, err := repo.RunQuiet(cmd) output := strings.Join(r.Stdout, "\n") if err != nil { - log.Log(WARN, "gitDescribeByName() output might have worked anyway:", output) - log.Log(WARN, "gitDescribeByName() not in a git repo?", err, repo.GetGoPath()) + log.Log(WARN, repo.FullPath, "gitDescribeByName() ", output, err, cmd) return "", err } return strings.TrimSpace(output), nil -- cgit v1.2.3