Skip to content

Commit ccf1e8a

Browse files
authored
Fix bufplugin Plugin.Digest calculation (#3910)
1 parent 246d5a0 commit ccf1e8a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

private/bufpkg/bufplugin/plugin.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
package bufplugin
1616

1717
import (
18+
"bytes"
1819
"fmt"
1920
"strings"
2021
"sync"
@@ -308,7 +309,7 @@ func newGetDigestFuncForPluginAndDigestType(plugin *plugin, digestType DigestTyp
308309
if err != nil {
309310
return nil, err
310311
}
311-
bufcasDigest, err := bufcas.NewDigest(data)
312+
bufcasDigest, err := bufcas.NewDigestForContent(bytes.NewReader(data))
312313
if err != nil {
313314
return nil, err
314315
}

0 commit comments

Comments
 (0)