diff options
Diffstat (limited to 'cmd/podman/main.go')
-rw-r--r-- | cmd/podman/main.go | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/cmd/podman/main.go b/cmd/podman/main.go index 8f580601e..929c8a757 100644 --- a/cmd/podman/main.go +++ b/cmd/podman/main.go @@ -18,6 +18,7 @@ import ( _ "github.com/containers/podman/v4/cmd/podman/secrets" _ "github.com/containers/podman/v4/cmd/podman/system" _ "github.com/containers/podman/v4/cmd/podman/system/connection" + "github.com/containers/podman/v4/cmd/podman/validate" _ "github.com/containers/podman/v4/cmd/podman/volumes" "github.com/containers/podman/v4/pkg/domain/entities" "github.com/containers/podman/v4/pkg/rootless" @@ -64,8 +65,8 @@ func parseCommands() *cobra.Command { c.Command.Hidden = true // overwrite persistent pre/post function to skip setup - c.Command.PersistentPostRunE = noop - c.Command.PersistentPreRunE = noop + c.Command.PersistentPostRunE = validate.NoOp + c.Command.PersistentPreRunE = validate.NoOp addCommand(c) continue } @@ -120,7 +121,3 @@ func addCommand(c registry.CliCommand) { c.Command.SetUsageTemplate(usageTemplate) c.Command.DisableFlagsInUseLine = true } - -func noop(cmd *cobra.Command, args []string) error { - return nil -} |