We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d907121 commit 71daaaaCopy full SHA for 71daaaa
internal/config/config.go
@@ -164,7 +164,7 @@ func Load(path string) error {
164
viper.SetDefault(FollowerFalcoVersionsKey, DefaultFollower.FalcoVersions)
165
166
err = viper.ReadInConfig()
167
- if errors.As(err, &viper.ConfigFileNotFoundError{}) {
+ if errors.As(err, &viper.ConfigFileNotFoundError{}) || os.IsNotExist(err) {
168
// If the config is not found, we create the file with the
169
// already set up default values
170
if err = os.MkdirAll(filepath.Dir(absolutePath), 0o700); err != nil {
0 commit comments