mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-09-19 06:07:50 +00:00
Don't check configuration until user input is applied
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
parent
6f28c92865
commit
f44f830e9f
3 changed files with 5 additions and 2 deletions
|
|
@ -708,7 +708,6 @@ type UntagValues struct {
|
|||
func GetDefaultConfig() *config.Config {
|
||||
var err error
|
||||
conf, err := config.NewConfig("")
|
||||
conf.CheckCgroupsAndAdjustConfig()
|
||||
if err != nil {
|
||||
logrus.Errorf("Error loading container config %v\n", err)
|
||||
os.Exit(1)
|
||||
|
|
|
|||
|
|
@ -126,6 +126,9 @@ func before(cmd *cobra.Command, args []string) error {
|
|||
return err
|
||||
}
|
||||
|
||||
defaultContainerConfig.Engine.CgroupManager = MainGlobalOpts.CGroupManager
|
||||
defaultContainerConfig.CheckCgroupsAndAdjustConfig()
|
||||
|
||||
if err := setupRootless(cmd, args); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -131,8 +131,9 @@ func NewRuntime(ctx context.Context, options ...RuntimeOption) (runtime *Runtime
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
runtime, err = newRuntimeFromConfig(ctx, conf, options...)
|
||||
conf.CheckCgroupsAndAdjustConfig()
|
||||
return newRuntimeFromConfig(ctx, conf, options...)
|
||||
return runtime, err
|
||||
}
|
||||
|
||||
// NewRuntimeFromConfig creates a new container runtime using the given
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue