summaryrefslogtreecommitdiff
path: root/cmd/podman/refresh.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/refresh.go')
-rw-r--r--cmd/podman/refresh.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/cmd/podman/refresh.go b/cmd/podman/refresh.go
index 193be6953..ed2e173ab 100644
--- a/cmd/podman/refresh.go
+++ b/cmd/podman/refresh.go
@@ -12,9 +12,13 @@ import (
var (
refreshCommand cliconfig.RefreshValues
- 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{
+ refreshDescription = `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 {
@@ -28,14 +32,11 @@ var (
func init() {
_refreshCommand.Hidden = true
refreshCommand.Command = _refreshCommand
+ refreshCommand.SetHelpTemplate(HelpTemplate())
refreshCommand.SetUsageTemplate(UsageTemplate())
}
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")