Skip to content

Commit

Permalink
send command output to stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
djeebus committed Jan 10, 2024
1 parent 2404245 commit 2e872ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/local/gitRepos.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 2 additions & 0 deletions pkg/repo/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 2e872ce

Please sign in to comment.