Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2210 fix windows end of line #2216

Merged
merged 5 commits into from
Jan 27, 2022
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions CHANGELOG_PENDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

#### General

- \#2216 Fix Accept Multiline message on Windows (@leszko)

#### Broadcaster

#### Orchestrator
Expand Down
5 changes: 5 additions & 0 deletions build/const.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// +build !windows

package build

const AcceptMultiline = "Ctrl+D"
5 changes: 5 additions & 0 deletions build/const_windows.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// +build windows

package build

const AcceptMultiline = "Ctrl+Z"
3 changes: 2 additions & 1 deletion cmd/livepeer_cli/wizard.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"bytes"
"errors"
"fmt"
"github.com/livepeer/go-livepeer/build"
"io/ioutil"
"math/big"
"net/http"
Expand Down Expand Up @@ -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)
Expand Down