aboutsummaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2018-04-18 10:59:40 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-04-18 15:53:30 +0000
commit06f0d0bf6e3fd595d3726680a0ea1bc828b0cab9 (patch)
tree090b64e3889ea3b3f89d8d716b7ca4e5d8206ea9 /cmd/podman
parent46b0e1bb277fec2df4dacc14e982252bf2c9049c (diff)
downloadpodman-06f0d0bf6e3fd595d3726680a0ea1bc828b0cab9.tar.gz
podman-06f0d0bf6e3fd595d3726680a0ea1bc828b0cab9.tar.bz2
podman-06f0d0bf6e3fd595d3726680a0ea1bc828b0cab9.zip
Refactor logic for forceSecure in pull for readability
Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #636 Approved by: rhatdan
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/pull.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/podman/pull.go b/cmd/podman/pull.go
index 670d6d4fc..cab549a02 100644
--- a/cmd/podman/pull.go
+++ b/cmd/podman/pull.go
@@ -58,7 +58,7 @@ var (
// pullCmd gets the data from the command line and calls pullImage
// to copy an image from a registry to a local machine
func pullCmd(c *cli.Context) error {
- forceSecure := true
+ forceSecure := false
runtime, err := getRuntime(c)
if err != nil {
return errors.Wrapf(err, "could not get runtime")
@@ -99,8 +99,8 @@ func pullCmd(c *cli.Context) error {
DockerCertPath: c.String("cert-dir"),
DockerInsecureSkipTLSVerify: !c.BoolT("tls-verify"),
}
- if !c.IsSet("tls-verify") || !c.Bool("tls-verify") {
- forceSecure = false
+ if c.IsSet("tls-verify") {
+ forceSecure = c.Bool("tls-verify")
}
newImage, err := runtime.ImageRuntime().New(image, c.String("signature-policy"), c.String("authfile"), writer, &dockerRegistryOptions, image2.SigningOptions{}, true, forceSecure)