Skip to content

Commit

Permalink
fix: don't fail for missing configuration file (#213)
Browse files Browse the repository at this point in the history
  • Loading branch information
kushsharma committed Feb 16, 2023
1 parent 3f0a2e7 commit ebce42b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@ func Load(serverConfigfileFromFlag string) (*Shield, error) {

l := config.NewLoader(options...)
if err := l.Load(conf); err != nil {
if errors.As(err, &config.ConfigFileNotFoundError{}) {
return nil, errors.New("config file not found")
} else {
if !errors.As(err, &config.ConfigFileNotFoundError{}) {
return nil, err
}
}
Expand Down

0 comments on commit ebce42b

Please sign in to comment.