Skip to content

Commit b350e14

Browse files
authored
Merge pull request #2569 from thaJeztah/hardcode_name_in_errors
Use consistent name for errors
2 parents 8f14db8 + a3af1f4 commit b350e14

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

cli/command/container/run.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"context"
55
"fmt"
66
"io"
7-
"os"
87
"runtime"
98
"strings"
109
"syscall"
@@ -282,9 +281,9 @@ func attachContainer(
282281
func reportError(stderr io.Writer, name string, str string, withHelp bool) {
283282
str = strings.TrimSuffix(str, ".") + "."
284283
if withHelp {
285-
str += "\nSee '" + os.Args[0] + " " + name + " --help'."
284+
str += "\nSee 'docker " + name + " --help'."
286285
}
287-
fmt.Fprintf(stderr, "%s: %s\n", os.Args[0], str)
286+
fmt.Fprintln(stderr, "docker:", str)
288287
}
289288

290289
// if container start fails with 'not found'/'no such' error, return 127

0 commit comments

Comments
 (0)