Skip to content

Commit

Permalink
fix erroneous docstring of sh.Exec() (#452)
Browse files Browse the repository at this point in the history
sh.Exec() uses the passed in stderr io.Writer to write the stderr output
not "piping its stderr to mage's stderr".
  • Loading branch information
omarkohl authored Mar 6, 2023
1 parent 02bde0b commit 9199872
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions sh/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,14 @@ func OutputWith(env map[string]string, cmd string, args ...string) (string, erro
return strings.TrimSuffix(buf.String(), "\n"), err
}

// Exec executes the command, piping its stderr to mage's stderr and
// piping its stdout to the given writer. If the command fails, it will return
// an error that, if returned from a target or mg.Deps call, will cause mage to
// exit with the same code as the command failed with. Env is a list of
// environment variables to set when running the command, these override the
// current environment variables set (which are also passed to the command). cmd
// and args may include references to environment variables in $FOO format, in
// which case these will be expanded before the command is run.
// Exec executes the command, piping its stdout and stderr to the given
// writers. If the command fails, it will return an error that, if returned
// from a target or mg.Deps call, will cause mage to exit with the same code as
// the command failed with. Env is a list of environment variables to set when
// running the command, these override the current environment variables set
// (which are also passed to the command). cmd and args may include references
// to environment variables in $FOO format, in which case these will be
// expanded before the command is run.
//
// Ran reports if the command ran (rather than was not found or not executable).
// Code reports the exit code the command returned if it ran. If err == nil, ran
Expand Down

0 comments on commit 9199872

Please sign in to comment.