Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions cmd/dev.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package cmd

import (
"bufio"
"encoding/json"
"errors"
"fmt"
Expand Down Expand Up @@ -138,14 +137,8 @@ func readPipedStdin() []byte {
cli.ExitWithError("Failed to read stat from stdin", err)
}
if (stat.Mode() & os.ModeCharDevice) == 0 {
var buf []byte
scanner := bufio.NewScanner(os.Stdin)

for scanner.Scan() {
buf = append(buf, scanner.Bytes()...)
}

if err := scanner.Err(); err != nil {
buf, err := io.ReadAll(os.Stdin)
if err != nil {
cli.ExitWithError("failed to scan bytes from stdin", err)
}
return buf
Expand Down