mirror of https://github.com/docker/cli.git
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:
parent
a17f67e456
commit
f65d5365a2
|
@ -169,7 +169,7 @@ func noArgs(cmd *cobra.Command, args []string) error {
|
||||||
func main() {
|
func main() {
|
||||||
dockerCli, err := command.NewDockerCli()
|
dockerCli, err := command.NewDockerCli()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintln(dockerCli.Err(), err)
|
fmt.Fprintln(os.Stderr, err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
logrus.SetOutput(dockerCli.Err())
|
logrus.SetOutput(dockerCli.Err())
|
||||||
|
|
Loading…
Reference in New Issue