mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-10-31 10:17:43 +00:00
Move cgroup check below help/completion/subcommands check
NixOS builds podman inside a sandbox and uses the `podman completion` subcommand. While upgrading to Podman 6, we noticed that this command now started failing in our build sandbox because of the cgroup check. The cgroups are not relevant to completion generation. Signed-off-by: Marie Ramlow <marie@marie.cologne>
This commit is contained in:
parent
5866b09c1f
commit
7cef788844
1 changed files with 2 additions and 2 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue