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:
Sebastiaan van Stijn 2020-06-12 16:20:30 +02:00 committed by GitHub
commit 6051b36dbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -4,7 +4,6 @@ import (
"context"
"fmt"
"io"
"os"
"runtime"
"strings"
"syscall"
@ -280,9 +279,9 @@ func attachContainer(
func reportError(stderr io.Writer, name string, str string, withHelp bool) {
str = strings.TrimSuffix(str, ".") + "."
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