From c32068354059e4839eaa133abd57ade6f29d5b12 Mon Sep 17 00:00:00 2001 From: Joseph Lombrozo Date: Tue, 9 Jan 2024 21:29:29 -0500 Subject: [PATCH] send command output to stdout (#100) --- pkg/local/gitRepos.go | 2 ++ pkg/repo/repo.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/pkg/local/gitRepos.go b/pkg/local/gitRepos.go index 4036c83f..b8603bb8 100644 --- a/pkg/local/gitRepos.go +++ b/pkg/local/gitRepos.go @@ -69,6 +69,8 @@ func (rd *ReposDirectory) Register(ctx context.Context, cloneUrl string) string func (rd *ReposDirectory) fetchLatest() { cmd := exec.Command("git", "pull") + cmd.Stdout = os.Stdout + cmd.Stderr = os.Stdout err := cmd.Run() if err != nil { log.Err(err).Msg("failed to pull latest") diff --git a/pkg/repo/repo.go b/pkg/repo/repo.go index e431eb85..7369ae5c 100644 --- a/pkg/repo/repo.go +++ b/pkg/repo/repo.go @@ -214,6 +214,8 @@ func (r *Repo) execCommand(name string, args ...string) *exec.Cmd { func execCommand(name string, args ...string) *exec.Cmd { log.Debug().Strs("args", args).Msg("building command") cmd := exec.Command(name, args...) + cmd.Stdout = os.Stdout + cmd.Stderr = os.Stdout return cmd }