aboutsummaryrefslogtreecommitdiff
path: root/src/os/exec/exec.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/os/exec/exec.go')
-rw-r--r--src/os/exec/exec.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/os/exec/exec.go b/src/os/exec/exec.go
index 363759546f..fecfc97d13 100644
--- a/src/os/exec/exec.go
+++ b/src/os/exec/exec.go
@@ -1000,7 +1000,9 @@ func (c *Cmd) awaitGoroutines(timer *time.Timer) error {
// Output runs the command and returns its standard output.
// Any returned error will usually be of type [*ExitError].
-// If c.Stderr was nil, Output populates [ExitError.Stderr].
+// If c.Stderr was nil and the returned error is of type
+// [*ExitError], Output populates the Stderr field of the
+// returned error.
func (c *Cmd) Output() ([]byte, error) {
if c.Stdout != nil {
return nil, errors.New("exec: Stdout already set")