summaryrefslogtreecommitdiff
path: root/cmd/podman/generate_kube.go
diff options
context:
space:
mode:
authorEd Santiago <santiago@redhat.com>2019-03-18 13:22:39 -0600
committerEd Santiago <santiago@redhat.com>2019-03-18 14:05:17 -0600
commitabf3500e8f672e71c6e91fd5bbb70da6abd4d5af (patch)
treefaa5f177773f0dfe181b234d7970f565d66ef130 /cmd/podman/generate_kube.go
parent03160dcf489f20102feb0f35b6bdb94fbafbc443 (diff)
downloadpodman-abf3500e8f672e71c6e91fd5bbb70da6abd4d5af.tar.gz
podman-abf3500e8f672e71c6e91fd5bbb70da6abd4d5af.tar.bz2
podman-abf3500e8f672e71c6e91fd5bbb70da6abd4d5af.zip
podman umount: error out if called with no args
Inspired by #2684, I wrote a CI test to look for other such instances in which a command is invoked without a required argument. 'podman umount' seems to be the only one, and solution is simple: checkAllAndLatest() already does the check for us. Resolve a few other problems uncovered by testing: podman mount: indicate that CONTAINER arg is optional podman pod stats: ditto podman generate kube: remove check for -l (latest) flag, it isn't actually implemented. Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'cmd/podman/generate_kube.go')
-rw-r--r--cmd/podman/generate_kube.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/podman/generate_kube.go b/cmd/podman/generate_kube.go
index e3db14af3..42cfba8d8 100644
--- a/cmd/podman/generate_kube.go
+++ b/cmd/podman/generate_kube.go
@@ -57,8 +57,8 @@ func generateKubeYAMLCmd(c *cliconfig.GenerateKubeValues) error {
return errors.Wrapf(libpod.ErrNotImplemented, "rootless users")
}
args := c.InputArgs
- if len(args) > 1 || (len(args) < 1 && !c.Bool("latest")) {
- return errors.Errorf("you must provide one container|pod ID or name or --latest")
+ if len(args) != 1 {
+ return errors.Errorf("you must provide exactly one container|pod ID or name")
}
runtime, err := libpodruntime.GetRuntime(&c.PodmanCommand)