fix stdin type mismatch in windows

This commit is contained in:
boypt
2020-06-01 07:28:42 -05:00
committed by Nicholas Wang
parent 774bdf202b
commit f426c5cce5
+2 -1
View File
@@ -3,6 +3,7 @@ package command
//go:generate errorgen
import (
"bufio"
"os"
"github.com/golang/protobuf/proto"
@@ -27,7 +28,7 @@ func (c *ConfigCommand) Description() control.Description {
}
func (c *ConfigCommand) Execute(args []string) error {
pbConfig, err := serial.LoadJSONConfig(os.Stdin)
pbConfig, err := serial.LoadJSONConfig(bufio.NewReader(os.Stdin))
if err != nil {
return newError("failed to parse json config").Base(err)
}