summaryrefslogtreecommitdiff
path: root/cmd/podman/refresh.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-03-01 12:22:12 -0800
committerGitHub <noreply@github.com>2019-03-01 12:22:12 -0800
commite4746f9b4b679548d88f0ea94f73d760b2658c3c (patch)
tree7911dcb15acde80a1c03529e7d42a6dcc9cd45f2 /cmd/podman/refresh.go
parentce8d7b8539ec724cce7eac14d5d555c3c3c23266 (diff)
parent9934507d74c97bccb753b04873eb74652600b6ff (diff)
downloadpodman-e4746f9b4b679548d88f0ea94f73d760b2658c3c.tar.gz
podman-e4746f9b4b679548d88f0ea94f73d760b2658c3c.tar.bz2
podman-e4746f9b4b679548d88f0ea94f73d760b2658c3c.zip
Merge pull request #2452 from edsantiago/no_more_args
Command-line input validation: reject unused args
Diffstat (limited to 'cmd/podman/refresh.go')
-rw-r--r--cmd/podman/refresh.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/cmd/podman/refresh.go b/cmd/podman/refresh.go
index 193be6953..1e4a31a52 100644
--- a/cmd/podman/refresh.go
+++ b/cmd/podman/refresh.go
@@ -15,6 +15,7 @@ var (
refreshDescription = "The refresh command resets the state of all containers to handle database changes after a Podman upgrade. All running containers will be restarted."
_refreshCommand = &cobra.Command{
Use: "refresh",
+ Args: noSubArgs,
Short: "Refresh container state",
Long: refreshDescription,
RunE: func(cmd *cobra.Command, args []string) error {
@@ -32,10 +33,6 @@ func init() {
}
func refreshCmd(c *cliconfig.RefreshValues) error {
- if len(c.InputArgs) > 0 {
- return errors.Errorf("refresh does not accept any arguments")
- }
-
runtime, err := libpodruntime.GetRuntime(&c.PodmanCommand)
if err != nil {
return errors.Wrapf(err, "error creating libpod runtime")