Merge pull request #3806 from mheon/hooks_notexist_nonfatal

Running Podman with a nonexistent hooks dir is nonfatal
This commit is contained in:
OpenShift Merge Robot 2019-08-14 14:23:37 +02:00 committed by GitHub
commit a734b53357
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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
}
}