diff options
Diffstat (limited to 'cmd/podman/system/service.go')
-rw-r--r-- | cmd/podman/system/service.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cmd/podman/system/service.go b/cmd/podman/system/service.go index 221738f33..0f42ae28b 100644 --- a/cmd/podman/system/service.go +++ b/cmd/podman/system/service.go @@ -17,6 +17,7 @@ import ( "github.com/containers/libpod/pkg/util" "github.com/sirupsen/logrus" "github.com/spf13/cobra" + "github.com/spf13/pflag" ) var ( @@ -52,6 +53,14 @@ func init() { flags.BoolVar(&srvArgs.Varlink, "varlink", false, "Use legacy varlink service instead of REST") _ = flags.MarkDeprecated("varlink", "valink API is deprecated.") + flags.SetNormalizeFunc(aliasTimeoutFlag) +} + +func aliasTimeoutFlag(_ *pflag.FlagSet, name string) pflag.NormalizedName { + if name == "timeout" { + name = "time" + } + return pflag.NormalizedName(name) } func service(cmd *cobra.Command, args []string) error { |