We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c542aee commit bf89d33Copy full SHA for bf89d33
1 file changed
internal/openclaw/launch.go
@@ -1,6 +1,7 @@
1
package openclaw
2
3
import (
4
+ "bufio"
5
"encoding/json"
6
"fmt"
7
"os"
@@ -459,8 +460,8 @@ func RunCommand(args ...string) error {
459
460
// promptYesNo asks a yes/no question
461
func promptYesNo(question string) bool {
462
fmt.Printf("%s (Y/n): ", question)
- var answer string
463
- fmt.Scanln(&answer)
+ reader := bufio.NewReader(os.Stdin)
464
+ answer, _ := reader.ReadString('\n')
465
answer = strings.ToLower(strings.TrimSpace(answer))
466
return answer == "" || answer == "y" || answer == "yes"
467
}
0 commit comments