mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-22 18:17:52 -05:00
fix stdin type mismatch in windows
This commit is contained in:
parent
1a7b2337f8
commit
388af4d1e3
@ -3,6 +3,7 @@ package command
|
|||||||
//go:generate errorgen
|
//go:generate errorgen
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bufio"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
@ -27,7 +28,7 @@ func (c *ConfigCommand) Description() control.Description {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *ConfigCommand) Execute(args []string) error {
|
func (c *ConfigCommand) Execute(args []string) error {
|
||||||
pbConfig, err := serial.LoadJSONConfig(os.Stdin)
|
pbConfig, err := serial.LoadJSONConfig(bufio.NewReader(os.Stdin))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return newError("failed to parse json config").Base(err)
|
return newError("failed to parse json config").Base(err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user