diff --git a/cmd/finch/main_test.go b/cmd/finch/main_test.go index 58b42c30c..369067912 100644 --- a/cmd/finch/main_test.go +++ b/cmd/finch/main_test.go @@ -79,7 +79,7 @@ func TestXmain(t *testing.T) { { name: "failed to load finch config because of invalid YAML", wantErr: fmt.Errorf("failed to load config: %w", - fmt.Errorf("failed to unmarshal config file, using default values: %w", + fmt.Errorf("failed to unmarshal config file: %w", &yaml.TypeError{Errors: []string{"line 1: cannot unmarshal !!str `this is...` into config.Finch"}}, ), ), diff --git a/pkg/config/config.go b/pkg/config/config.go index df952f643..b512323fd 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -114,7 +114,7 @@ func Load(fs afero.Fs, cfgPath string, log flog.Logger, systemDeps LoadSystemDep var cfg Finch if err := yaml.Unmarshal(b, &cfg); err != nil { - return nil, fmt.Errorf("failed to unmarshal config file, using default values: %w", err) + return nil, fmt.Errorf("failed to unmarshal config file: %w", err) } defCfg := applyDefaults(&cfg, systemDeps, mem) diff --git a/pkg/config/config_test.go b/pkg/config/config_test.go index 57da3151b..7a5be8f42 100644 --- a/pkg/config/config_test.go +++ b/pkg/config/config_test.go @@ -96,7 +96,7 @@ cpus: 8 }, want: nil, wantErr: fmt.Errorf( - "failed to unmarshal config file, using default values: %w", + "failed to unmarshal config file: %w", &yaml.TypeError{Errors: []string{"line 1: cannot unmarshal !!str `this is...` into config.Finch"}}, ), },