Skip to content

Commit bdaa5a2

Browse files
committed
Preserve strict mode behavior
1 parent ddbf82c commit bdaa5a2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/dazzle/project.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
package dazzle
2222

2323
import (
24+
"bytes"
2425
"encoding/hex"
2526
"fmt"
2627
"io"
@@ -331,7 +332,10 @@ func loadChunks(dir fs.FS, contextBase, base, name string) (res []ProjectChunk,
331332
} else if err != nil {
332333
return nil, fmt.Errorf("%s: cannot read tests.yaml: %w", dir, err)
333334
}
334-
err = yaml.Unmarshal(tf, &chk.Tests)
335+
336+
decoder := yaml.NewDecoder(bytes.NewReader(tf))
337+
decoder.KnownFields(true)
338+
err = decoder.Decode(&chk.Tests)
335339
if err != nil {
336340
return &chk, fmt.Errorf("%s: cannot read tests.yaml: %w", dir, err)
337341
}

0 commit comments

Comments
 (0)