Code changes for Directory validation.

Signed-off-by: Sunil Kumar <suryakn27@outlook.com>
pull/10807/head^2
suryatech27-cloud 4 years ago
parent 163af70dae
commit 7f7344b490

@ -78,8 +78,8 @@ func ReadCertFromSecDir(host string) (opts Options, err error) {
fmt.Printf("Please Configure secondary certificate directory for ssl connection set/export HELM_SECONDARY_CERT_DIR='/etc/docker/certs.d/'\n")
os.Exit(1)
}
lastIndex := strings.LastIndexByte(clientCertDir, '/')
if lastIndex < 19 {
if clientCertDir[len(clientCertDir)-1] != '/' {
clientCertDir = fmt.Sprintf("%s/%s", clientCertDir, host)
} else {
clientCertDir = fmt.Sprintf("%s%s", clientCertDir, host)

Loading…
Cancel
Save