Skip to content

Commit

Permalink
Add RunVWith command (magefile#261)
Browse files Browse the repository at this point in the history
* Add RunVWith command
  • Loading branch information
eberkund authored and mojzesh committed Oct 12, 2019
1 parent c93e135 commit 5fdb418
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 5fdb418

Please sign in to comment.