diff --git a/cmd/control/util.go b/cmd/control/util.go index adced8b0..5e83803e 100644 --- a/cmd/control/util.go +++ b/cmd/control/util.go @@ -1,7 +1,9 @@ package control import ( + "bufio" "fmt" + "os" "strings" "github.com/rancher/os/log" @@ -9,8 +11,8 @@ import ( func yes(question string) bool { fmt.Printf("%s [y/N]: ", question) - var line string - _, err := fmt.Scan(&line) + in := bufio.NewReader(os.Stdin) + line, err := in.ReadString('\n') if err != nil { log.Fatal(err) }