Skip to content

Commit

Permalink
Parse app config strictly
Browse files Browse the repository at this point in the history
In #3376 we switched `UnmarshalYAMLStrict` to `UnmarshalYAMLNonStrict`.
I'm not entirely sure if this was intentional, but we want this to be
strict by default. Happy to discuss if the CLI needs non-strict anywhere
and if so if we can make this configurable.
  • Loading branch information
saquibmian committed Feb 11, 2025
1 parent f9da74e commit 0b053c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion private/pkg/app/appext/appext.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func ReadConfig(container NameContainer, value interface{}) error {
if err != nil {
return fmt.Errorf("could not read %s configuration file at %s: %w", container.AppName(), configFilePath, err)
}
if err := encoding.UnmarshalYAMLNonStrict(data, value); err != nil {
if err := encoding.UnmarshalYAMLStrict(data, value); err != nil {
return fmt.Errorf("invalid %s configuration file: %w", container.AppName(), err)
}
}
Expand Down

0 comments on commit 0b053c4

Please sign in to comment.