summaryrefslogtreecommitdiff
path: root/cmd/podman/main.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-05-04 11:28:11 -0400
committerGitHub <noreply@github.com>2022-05-04 11:28:11 -0400
commit02eef6c4bf5b423c5f97a9883d21f2b4152a45ce (patch)
treef270d90ebba169bb883398a8a42c10f1df8ea305 /cmd/podman/main.go
parent89e60648404bfbcf9ea8d5cb84c01c1f5e72a890 (diff)
parenta21e112364f93a1a7d342584a239b289a8ee9f0a (diff)
downloadpodman-02eef6c4bf5b423c5f97a9883d21f2b4152a45ce.tar.gz
podman-02eef6c4bf5b423c5f97a9883d21f2b4152a45ce.tar.bz2
podman-02eef6c4bf5b423c5f97a9883d21f2b4152a45ce.zip
Merge pull request #14112 from openshift-cherrypick-robot/cherry-pick-14085-to-v4.1
[v4.1] Add podman machine events
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
-}