From f65d5365a227cb3fddb8367a7c100ab9cec01275 Mon Sep 17 00:00:00 2001 From: Silvin Lubecki Date: Tue, 29 Jan 2019 16:21:39 +0100 Subject: [PATCH] Fix using a nil dockerCli if an error occurred during cli creation, using the standard error stream instead. Signed-off-by: Silvin Lubecki --- cmd/docker/docker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/docker/docker.go b/cmd/docker/docker.go index 5909953be3..a08cc06dc4 100644 --- a/cmd/docker/docker.go +++ b/cmd/docker/docker.go @@ -169,7 +169,7 @@ func noArgs(cmd *cobra.Command, args []string) error { func main() { dockerCli, err := command.NewDockerCli() if err != nil { - fmt.Fprintln(dockerCli.Err(), err) + fmt.Fprintln(os.Stderr, err) os.Exit(1) } logrus.SetOutput(dockerCli.Err())