mirror of
https://github.com/containers/podman.git
synced 2025-05-20 00:27:03 +08:00
container.conf: support attributed string slices
All `[]string`s in containers.conf have now been migrated to attributed string slices which require some adjustments in Buildah and Podman. [NO NEW TESTS NEEDED] Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This commit is contained in:
@ -2251,7 +2251,7 @@ func (c *Container) saveSpec(spec *spec.Spec) error {
|
||||
// Warning: precreate hooks may alter 'config' in place.
|
||||
func (c *Container) setupOCIHooks(ctx context.Context, config *spec.Spec) (map[string][]spec.Hook, error) {
|
||||
allHooks := make(map[string][]spec.Hook)
|
||||
if c.runtime.config.Engine.HooksDir == nil {
|
||||
if len(c.runtime.config.Engine.HooksDir.Get()) == 0 {
|
||||
if rootless.IsRootless() {
|
||||
return nil, nil
|
||||
}
|
||||
@ -2275,7 +2275,7 @@ func (c *Container) setupOCIHooks(ctx context.Context, config *spec.Spec) (map[s
|
||||
}
|
||||
}
|
||||
} else {
|
||||
manager, err := hooks.New(ctx, c.runtime.config.Engine.HooksDir, []string{"precreate", "poststop"})
|
||||
manager, err := hooks.New(ctx, c.runtime.config.Engine.HooksDir.Get(), []string{"precreate", "poststop"})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user