summaryrefslogtreecommitdiff
path: root/libpod/container_internal.go
diff options
context:
space:
mode:
authorMatthew Heon <mheon@redhat.com>2018-12-07 11:23:03 -0500
committerMatthew Heon <mheon@redhat.com>2018-12-07 11:35:43 -0500
commit176f76d7940f6b5c2599d0bb107db59ee14caf5a (patch)
treef0bc98cf6f755bf4d8c17de53cc688e5c91474ac /libpod/container_internal.go
parent71497706e124eaae0f4654278749c1e34a6c209f (diff)
downloadpodman-176f76d7940f6b5c2599d0bb107db59ee14caf5a.tar.gz
podman-176f76d7940f6b5c2599d0bb107db59ee14caf5a.tar.bz2
podman-176f76d7940f6b5c2599d0bb107db59ee14caf5a.zip
Fix errors where OCI hooks directory does not exist
Signed-off-by: Matthew Heon <mheon@redhat.com>
Diffstat (limited to 'libpod/container_internal.go')
-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
}