Skip to content

Commit

Permalink
Add RunVWith command (#261)
Browse files Browse the repository at this point in the history
* Add RunVWith command
  • Loading branch information
eberkund authored and natefinch committed Oct 3, 2019
1 parent d6f8413 commit 9e2b3db
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sh/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ func RunWith(env map[string]string, cmd string, args ...string) error {
return err
}

// RunWithV is like RunWith, but always sends the command's stdout to os.Stdout.
func RunWithV(env map[string]string, cmd string, args ...string) error {
_, err := Exec(env, os.Stdout, os.Stderr, cmd, args...)
return err
}

// Output runs the command and returns the text from stdout.
func Output(cmd string, args ...string) (string, error) {
buf := &bytes.Buffer{}
Expand Down

0 comments on commit 9e2b3db

Please sign in to comment.