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 e02f89e commit a9cf3baCopy full SHA for a9cf3ba
internal/pkg/profile/types.go
@@ -1,6 +1,7 @@
1
package profile
2
3
import (
4
+ "errors"
5
"path"
6
7
"github.com/spf13/viper"
@@ -34,7 +35,9 @@ func (p *Profile) Config() *Config {
34
35
v := viper.New()
36
v.SetConfigFile(path.Join(p.Directory, "config.json"))
37
- if err := v.ReadInConfig(); err != nil {
38
+ err := v.ReadInConfig()
39
+ if err != nil && !errors.As(err, &viper.ConfigFileNotFoundError{}) {
40
+ // For some reason viper doesnt implement Is() for ConfigFileNotFoundError
41
panic(err) //todo
42
}
43
0 commit comments