fix(config): reject a hidden YAML document and drop Go types from errors

This commit is contained in:
aykhans committed 2026-09-30 12:29:00 +04:00
1 parent 633f548e7b
commit 4a14d57d15
3 files changed
+184 -27

No files matched your search

+1 -1
View File
@@ -33,7 +33,7 @@ func (size *byteSize) Set(value string) error {
// UnmarshalYAML reads the raw scalar so a size parses the same way here as on the command line.
func (size *byteSize) UnmarshalYAML(node *yaml.Node) error {
if node.Kind != yaml.ScalarNode {
return fmt.Errorf("expected a size, but got %s", node.Tag)
return fmt.Errorf("expected a size, but got %s", yamlNodeName(node))
}
return size.Set(node.Value)