Skip to content

Commit

Permalink
internal/encoding: don't interpret file as UTF8 with binary encoding
Browse files Browse the repository at this point in the history
Signed-off-by: nichtsundniemand <rufus.schaefing@gmail.com>
  • Loading branch information
nichtsundniemand committed Feb 10, 2025
1 parent 1d7f66f commit 667070b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/encoding/encoding.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ func NewDecoder(ctx *cue.Context, f *build.File, cfg *Config) *Decoder {
i.err = err
i.expr = ast.NewString(string(b))
case build.Binary:
b, err := io.ReadAll(r)
b, err := io.ReadAll(srcr)
i.err = err
s := literal.Bytes.WithTabIndent(1).Quote(string(b))
i.expr = ast.NewLit(token.STRING, s)
Expand Down

0 comments on commit 667070b

Please sign in to comment.