Skip to content

Commit

Permalink
Merge pull request #4985 from baude/pushhidden
Browse files Browse the repository at this point in the history
Hidden remote flags can be nil
  • Loading branch information
openshift-merge-robot authored Jan 27, 2020
2 parents c28af15 + 7f69669 commit 2d9d5e7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/podman/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ func pushCmd(c *cliconfig.PushValues) error {

// --compress and --format can only be used for the "dir" transport
splitArg := strings.SplitN(destName, ":", 2)
if c.Flag("compress").Changed || c.Flag("format").Changed {

if c.IsSet("compress") || c.Flag("format").Changed {
if splitArg[0] != directory.Transport.Name() {
return errors.Errorf("--compress and --format can be set only when pushing to a directory using the 'dir' transport")
}
Expand Down Expand Up @@ -141,7 +142,7 @@ func pushCmd(c *cliconfig.PushValues) error {
DockerRegistryCreds: registryCreds,
DockerCertPath: certPath,
}
if c.Flag("tls-verify").Changed {
if c.IsSet("tls-verify") {
dockerRegistryOptions.DockerInsecureSkipTLSVerify = types.NewOptionalBool(!c.TlsVerify)
}

Expand Down

0 comments on commit 2d9d5e7

Please sign in to comment.