fix stdin type mismatch in windows

pull/2531/head
boypt 6 years ago committed by Nicholas Wang
parent 774bdf202b
commit f426c5cce5
No known key found for this signature in database
GPG Key ID: F20CA399C9BD9100

@ -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)
}

Loading…
Cancel
Save