mirror of https://github.com/containers/podman.git
Replace error check for non-existent file
Previously `os.IsNotExist(err)`, now `errors.Is(err, fs.ErrNotExist)` [NO NEW TESTS NEEDED] Signed-off-by: Ismael Arias <ismaelariasmn@gmail.com>
This commit is contained in:
parent
ca9874ab7d
commit
47997857ff
|
|
@ -7,6 +7,7 @@ import (
|
|||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/fs"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
|
|
@ -65,7 +66,7 @@ func DefaultPolicyPath(sys *types.SystemContext) string {
|
|||
if err == nil {
|
||||
return userPolicyFilePath
|
||||
}
|
||||
if !os.IsNotExist(err) {
|
||||
if !errors.Is(err, fs.ErrNotExist) {
|
||||
logrus.Warnf("Error trying to read local config file: %s", err.Error())
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue