summaryrefslogtreecommitdiff
path: root/libpod/container_internal.go
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/container_internal.go')
-rw-r--r--libpod/container_internal.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go
index 0015bed66..992c1d07b 100644
--- a/libpod/container_internal.go
+++ b/libpod/container_internal.go
@@ -1289,7 +1289,11 @@ func (c *Container) setupOCIHooks(ctx context.Context, g *generate.Generator) er
manager, err := hooks.New(ctx, []string{c.runtime.config.HooksDir})
if err != nil {
- return err
+ if c.runtime.config.HooksDirNotExistFatal || !os.IsNotExist(err) {
+ return err
+ }
+ logrus.Warnf("failed to load hooks: {}", err)
+ return nil
}
return manager.Hooks(g.Spec(), c.Spec().Annotations, len(c.config.UserVolumes) > 0)