mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-09-19 14:17:48 +00:00
Running Podman with a nonexistent hooks dir is nonfatal
Even explicitly defined hooks directories may not exist under some circumstances. It's not worth a hard-fail if we hit an ENOENT in these cases. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
This commit is contained in:
parent
ce64c1403d
commit
6aa4fbb0ea
1 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue