Skip to content

Commit

Permalink
Merge pull request #987 from rsteube/execlog-output
Browse files Browse the repository at this point in the history
execlog: added output functions
  • Loading branch information
rsteube committed Jan 31, 2024
2 parents a481597 + 8835894 commit 829d008
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkg/execlog/execlog.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ func Command(name string, arg ...string) *Cmd {
return cmd
}

func (c *Cmd) CombinedOutput() ([]byte, error) {
log.LOG.Printf("executing %#v", shlex.Join(c.Args))
return c.Cmd.CombinedOutput()
}

func (c *Cmd) Output() ([]byte, error) {
log.LOG.Printf("executing %#v", shlex.Join(c.Args))
return c.Cmd.Output()
}

func (c *Cmd) Run() error {
log.LOG.Printf("executing %#v", shlex.Join(c.Args))
return c.Cmd.Run()
Expand Down

0 comments on commit 829d008

Please sign in to comment.