summaryrefslogtreecommitdiff
path: root/cmd/podman/main.go
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2022-04-04 13:04:40 -0700
committeropenshift-cherrypick-robot <>2022-05-04 13:42:38 +0000
commita21e112364f93a1a7d342584a239b289a8ee9f0a (patch)
treeb6c3632932fc703a82a55fc50727f24f0fc323d2 /cmd/podman/main.go
parent3210a3f4257d19744abd4ae2302018b16edb2507 (diff)
downloadpodman-a21e112364f93a1a7d342584a239b289a8ee9f0a.tar.gz
podman-a21e112364f93a1a7d342584a239b289a8ee9f0a.tar.bz2
podman-a21e112364f93a1a7d342584a239b289a8ee9f0a.zip
Add podman machine events
Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'cmd/podman/main.go')
-rw-r--r--cmd/podman/main.go9
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
-}