Fix using a nil dockerCli if an error occurred during cli creation, using the standard error stream instead.

Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
This commit is contained in:
Silvin Lubecki 2019-01-29 16:21:39 +01:00
parent a17f67e456
commit f65d5365a2
1 changed files with 1 additions and 1 deletions

View File

@ -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())