Fix error handling during client TLS config setup (#8025)

This commit is contained in:
Michel Vocks
2019-12-18 11:22:15 +01:00
committed by GitHub
parent 39455f38a8
commit 488be87f67

View File

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