mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Use fmt.Errorf when appropriate.
This commit is contained in:
parent
dd1b9e38e9
commit
e93afcdd2b
1 changed files with 1 additions and 2 deletions
|
@ -4,7 +4,6 @@ import (
|
|||
"archive/tar"
|
||||
"bufio"
|
||||
"bytes"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/dotcloud/docker/utils"
|
||||
"io"
|
||||
|
@ -251,7 +250,7 @@ func CmdStream(cmd *exec.Cmd) (io.Reader, error) {
|
|||
}
|
||||
errText := <-errChan
|
||||
if err := cmd.Wait(); err != nil {
|
||||
pipeW.CloseWithError(errors.New(err.Error() + ": " + string(errText)))
|
||||
pipeW.CloseWithError(fmt.Errorf("%s: %s", err, errText))
|
||||
} else {
|
||||
pipeW.Close()
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue