5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-05 01:50:56 +08:00

fix: gitbash fixes

This commit is contained in:
Lea Anthony 2019-07-31 06:54:07 +10:00
parent 33daa8621e
commit bb86d770a1
No known key found for this signature in database
GPG Key ID: 33DAF7BB90A58405

View File

@ -4,7 +4,6 @@ import (
"bufio"
"fmt"
"os"
"runtime"
"strconv"
"strings"
)
@ -20,11 +19,7 @@ func Prompt(question string, defaultValue ...string) string {
fmt.Printf(question + ": ")
reader := bufio.NewReader(os.Stdin)
input, _ := reader.ReadString('\n')
EOL := "\n"
if runtime.GOOS == "windows" {
EOL = "\r\n"
}
input = strings.Replace(input, EOL, "", -1)
input = strings.TrimSpace(input)
if input != "" {
answer = input