diff options
| author | Jeff Carr <[email protected]> | 2024-11-13 10:33:25 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-11-13 10:33:25 -0600 |
| commit | 009d8f3b9d743fb1fa891376d5c36290681e33f1 (patch) | |
| tree | 54723bd0cc8c681a65b3572cea9f721356b636d9 /common.go | |
| parent | 55acea0bd769132db7bf420fef3b94fa21ca5f83 (diff) | |
improve output handling via go-cmd
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'common.go')
| -rw-r--r-- | common.go | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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) |
