diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index 38d5e2ab12..5ef216c466 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -8,6 +8,8 @@ #### General +- \#2216 Fix Accept Multiline message on Windows (@leszko) + #### Broadcaster #### Orchestrator diff --git a/build/const.go b/build/const.go new file mode 100644 index 0000000000..b1f514208c --- /dev/null +++ b/build/const.go @@ -0,0 +1,5 @@ +// +build !windows + +package build + +const AcceptMultiline = "Ctrl+D" diff --git a/build/const_windows.go b/build/const_windows.go new file mode 100644 index 0000000000..6ab02b3deb --- /dev/null +++ b/build/const_windows.go @@ -0,0 +1,5 @@ +// +build windows + +package build + +const AcceptMultiline = "Ctrl+Z" diff --git a/cmd/livepeer_cli/wizard.go b/cmd/livepeer_cli/wizard.go index df020b7daa..6758c25feb 100644 --- a/cmd/livepeer_cli/wizard.go +++ b/cmd/livepeer_cli/wizard.go @@ -5,6 +5,7 @@ import ( "bytes" "errors" "fmt" + "github.com/livepeer/go-livepeer/build" "io/ioutil" "math/big" "net/http" @@ -44,7 +45,7 @@ func (w *wizard) readString() string { } func (w *wizard) readMultilineString() string { - fmt.Printf("(press enter followed by CTRL+D when done) > ") + fmt.Printf("(press enter followed by %s when done) > ", build.AcceptMultiline) var buf strings.Builder scanner := bufio.NewScanner(os.Stdin)