mirror of https://github.com/docker/cli.git
Merge pull request #2570 from thaJeztah/19.03_backport_hardcode_name_in_errors
[19.03 backport] Use consistent name for errors
This commit is contained in:
commit
6051b36dbf
|
@ -4,7 +4,6 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"os"
|
|
||||||
"runtime"
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
@ -280,9 +279,9 @@ func attachContainer(
|
||||||
func reportError(stderr io.Writer, name string, str string, withHelp bool) {
|
func reportError(stderr io.Writer, name string, str string, withHelp bool) {
|
||||||
str = strings.TrimSuffix(str, ".") + "."
|
str = strings.TrimSuffix(str, ".") + "."
|
||||||
if withHelp {
|
if withHelp {
|
||||||
str += "\nSee '" + os.Args[0] + " " + name + " --help'."
|
str += "\nSee 'docker " + name + " --help'."
|
||||||
}
|
}
|
||||||
fmt.Fprintf(stderr, "%s: %s\n", os.Args[0], str)
|
fmt.Fprintln(stderr, "docker:", str)
|
||||||
}
|
}
|
||||||
|
|
||||||
// if container start fails with 'not found'/'no such' error, return 127
|
// if container start fails with 'not found'/'no such' error, return 127
|
||||||
|
|
Loading…
Reference in New Issue