summaryrefslogtreecommitdiff
path: root/common.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-11-13 10:33:25 -0600
committerJeff Carr <[email protected]>2024-11-13 10:33:25 -0600
commit009d8f3b9d743fb1fa891376d5c36290681e33f1 (patch)
tree54723bd0cc8c681a65b3572cea9f721356b636d9 /common.go
parent55acea0bd769132db7bf420fef3b94fa21ca5f83 (diff)
improve output handling via go-cmd
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'common.go')
-rw-r--r--common.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/common.go b/common.go
index c6d8995..74f57f4 100644
--- a/common.go
+++ b/common.go
@@ -8,7 +8,7 @@ import (
"unicode"
"go.wit.com/log"
- // "go.wit.com/gui/gui"
+ "go.wit.com/lib/gui/shell"
)
// reports externally if something has changed
@@ -164,7 +164,8 @@ func (rs *RepoStatus) RepoType() string {
return ""
}
os.Setenv("GO111MODULE", "off")
- r := rs.Run([]string{"go", "list", "-f", "'{{if eq .Name \"main\"}}binary{{else}}library{{end}}'"})
+ cmd := []string{"go", "list", "-f", "'{{if eq .Name \"main\"}}binary{{else}}library{{end}}'"}
+ r := shell.PathRunLog(rs.Path(), cmd, INFO)
output := strings.TrimSpace(strings.Join(r.Stdout, "\n"))
if r.Error != nil {
log.Info("go package error:", r.Error)