diff --git a/cmd/podman/root.go b/cmd/podman/root.go index 7a4e313c84..ffda5c42a3 100644 --- a/cmd/podman/root.go +++ b/cmd/podman/root.go @@ -266,8 +266,6 @@ func setupRemoteConnection(podmanConfig *entities.PodmanConfig) string { func persistentPreRunE(cmd *cobra.Command, args []string) error { logrus.Debugf("Called %s.PersistentPreRunE(%s)", cmd.Name(), strings.Join(os.Args, " ")) - checkSupportedCgroups() - // Help, completion and commands with subcommands are special cases, no need for more setup // Completion cmd is used to generate the shell scripts if cmd.Name() == "help" || cmd.Name() == "completion" || cmd.HasSubCommands() { @@ -275,6 +273,8 @@ func persistentPreRunE(cmd *cobra.Command, args []string) error { return nil } + checkSupportedCgroups() + podmanConfig := registry.PodmanConfig() if !registry.IsRemote() {