Skip to content

Commit f1ebbb6

Browse files
authored
set config type (#15)
fixes ConduitIO/conduit#2128
1 parent a8fbba9 commit f1ebbb6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

config.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,10 @@ func bindViperConfig(v *viper.Viper, cfg Config, cmd *cobra.Command) error {
8585
v.AutomaticEnv()
8686
v.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
8787

88-
// Handle config file
8988
v.SetConfigFile(cfg.Path)
89+
v.SetConfigType("yaml")
90+
91+
// Handle config file
9092
if err := v.ReadInConfig(); err != nil {
9193
// we make the existence of the config file optional
9294
if !os.IsNotExist(err) {

0 commit comments

Comments
 (0)