Skip to content

Commit

Permalink
fix: Continue if config file does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed Mar 12, 2024
1 parent ca59201 commit ee922fb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/config/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
package config

import (
"errors"
"os"
"regexp"

"github.com/knadh/koanf/parsers/yaml"
Expand Down Expand Up @@ -32,7 +34,7 @@ func Load(cmd *cobra.Command) (*Config, error) {

// Parse config file
parser := yaml.Parser()
if err := k.Load(file.Provider(cfgFile), parser); err != nil {
if err := k.Load(file.Provider(cfgFile), parser); err != nil && !errors.Is(err, os.ErrNotExist) {
return nil, err
}

Expand Down

0 comments on commit ee922fb

Please sign in to comment.