Fix --cert-dir path for podman login

podman login would add on the registry name to the cert-dir path
making containers/image look in a directory that did not exist for
certificates.

Signed-off-by: umohnani8 <umohnani@redhat.com>

Closes: #283
Approved by: rhatdan
This commit is contained in:
umohnani8
2018-02-01 12:22:34 -05:00
committed by Atomic Bot
parent 0387f69d39
commit d0eb1e0ed6

View File

@ -5,7 +5,6 @@ import (
"context"
"fmt"
"os"
"path/filepath"
"strings"
"github.com/containers/image/docker"
@ -75,7 +74,7 @@ func loginCmd(c *cli.Context) error {
}
sc.DockerInsecureSkipTLSVerify = !c.BoolT("tls-verify")
if c.String("cert-dir") != "" {
sc.DockerCertPath = filepath.Join(c.String("cert-dir"), server)
sc.DockerCertPath = c.String("cert-dir")
}
if err = docker.CheckAuth(context.TODO(), sc, username, password, server); err == nil {