summaryrefslogtreecommitdiff
path: root/cmd/podman/validate/latest.go
blob: c9bff798a01d54c49eef86d6ba26a9c86bff29cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package validate

import (
	"github.com/containers/podman/v2/cmd/podman/registry"
	"github.com/spf13/cobra"
)

func AddLatestFlag(cmd *cobra.Command, b *bool) {
	// Initialization flag verification
	if !registry.IsRemote() {
		cmd.Flags().BoolVarP(b, "latest", "l", false,
			"Act on the latest container podman is aware of\nNot supported with the \"--remote\" flag")
	}
}