From 488be87f67bb6f2fe5ad421e263ffaa508a0d3ca Mon Sep 17 00:00:00 2001 From: Michel Vocks Date: Wed, 18 Dec 2019 11:22:15 +0100 Subject: [PATCH] Fix error handling during client TLS config setup (#8025) --- command/base.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/command/base.go b/command/base.go index 5314d325cc..a3e73cde09 100644 --- a/command/base.go +++ b/command/base.go @@ -98,7 +98,11 @@ func (c *BaseCommand) Client() (*api.Client, error) { TLSServerName: c.flagTLSServerName, Insecure: c.flagTLSSkipVerify, } - config.ConfigureTLS(t) + + // Setup TLS config + if err := config.ConfigureTLS(t); err != nil { + return nil, errors.Wrap(err, "failed to setup TLS config") + } } // Build the client