Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit fd679d6

Browse files
authored
Merge pull request #2570 from thaJeztah/19.03_backport_hardcode_name_in_errors
[19.03 backport] Use consistent name for errors Upstream-commit: 6051b36dbf37216d1996ea54830f76ad43fd4c5c Component: cli
2 parents b882b20 + 6812565 commit fd679d6

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

  • components/cli/cli/command/container

components/cli/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"
@@ -280,9 +279,9 @@ func attachContainer(
280279
func reportError(stderr io.Writer, name string, str string, withHelp bool) {
281280
str = strings.TrimSuffix(str, ".") + "."
282281
if withHelp {
283-
str += "\nSee '" + os.Args[0] + " " + name + " --help'."
282+
str += "\nSee 'docker " + name + " --help'."
284283
}
285-
fmt.Fprintf(stderr, "%s: %s\n", os.Args[0], str)
284+
fmt.Fprintln(stderr, "docker:", str)
286285
}
287286

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

0 commit comments

Comments
 (0)