diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-08-14 14:23:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-14 14:23:37 +0200 |
commit | a734b53357a84d5156e2902113e72d9384f9515b (patch) | |
tree | 90061fdf59d8ff8719494de1a20cd1fdc211b7db /pkg/hooks/hooks.go | |
parent | ce64c1403df0e4ca75be50e4a835cc0889b0c8ac (diff) | |
parent | 6aa4fbb0ea769fe68e5921d7ee56bbc3b66ddc8b (diff) | |
download | podman-a734b53357a84d5156e2902113e72d9384f9515b.tar.gz podman-a734b53357a84d5156e2902113e72d9384f9515b.tar.bz2 podman-a734b53357a84d5156e2902113e72d9384f9515b.zip |
Merge pull request #3806 from mheon/hooks_notexist_nonfatal
Running Podman with a nonexistent hooks dir is nonfatal
Diffstat (limited to 'pkg/hooks/hooks.go')
-rw-r--r-- | pkg/hooks/hooks.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/hooks/hooks.go b/pkg/hooks/hooks.go index b962ffa5c..0d26bf4af 100644 --- a/pkg/hooks/hooks.go +++ b/pkg/hooks/hooks.go @@ -4,6 +4,7 @@ package hooks import ( "context" "fmt" + "os" "sort" "strings" "sync" @@ -56,7 +57,7 @@ func New(ctx context.Context, directories []string, extensionStages []string) (m for _, dir := range directories { err = ReadDir(dir, manager.extensionStages, manager.hooks) - if err != nil { + if err != nil && !os.IsNotExist(err) { return nil, err } } |