summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libpod/container_internal.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go
index 0148e3e7c..f69acb33b 100644
--- a/libpod/container_internal.go
+++ b/libpod/container_internal.go
@@ -1228,6 +1228,10 @@ func (c *Container) setupOCIHooks(ctx context.Context, config *spec.Spec) (exten
manager, err := hooks.New(ctx, c.runtime.config.HooksDir, []string{"poststop"}, lang)
if err != nil {
+ if os.IsNotExist(err) {
+ logrus.Warnf("Requested OCI hooks directory %q does not exist", c.runtime.config.HooksDir)
+ return nil, nil
+ }
return nil, err
}