Skip to content

Commit 5b13328

Browse files
jerryjrxieclaude
andcommitted
fix: use io.ReadAll instead of strings.Builder.ReadFrom in test
strings.Builder has no ReadFrom method; use io.ReadAll to read from the pipe instead. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 1370c97 commit 5b13328

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

internal/brew/brew_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package brew
22

33
import (
4+
"io"
45
"os"
56
"strings"
67
"testing"
@@ -215,10 +216,9 @@ func TestInstallWithProgress_BatchMode(t *testing.T) {
215216
w.Close()
216217
os.Stdout = oldStdout
217218

218-
var buf strings.Builder
219-
_, copyErr := buf.ReadFrom(r)
219+
outputBytes, copyErr := io.ReadAll(r)
220220
require.NoError(t, copyErr)
221-
output := buf.String()
221+
output := string(outputBytes)
222222

223223
assert.NoError(t, runErr)
224224
assert.Empty(t, formulae, "dry-run should not report installed formulae")

0 commit comments

Comments
 (0)