summaryrefslogtreecommitdiff
path: root/cmd/ponzu/options.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/ponzu/options.go')
-rw-r--r--cmd/ponzu/options.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/cmd/ponzu/options.go b/cmd/ponzu/options.go
index f092bf0..6a0af28 100644
--- a/cmd/ponzu/options.go
+++ b/cmd/ponzu/options.go
@@ -167,8 +167,10 @@ func newProjectInDir(path string) error {
// answer, err := input.ReadString('\n')
var answer string
- _, err := fmt.Scanf("%c\n", &answer)
- if err != nil {
+ _, err := fmt.Scanf("%s\n", &answer)
+ if err.Error() == "unexpected newline" {
+ return err
+ } else if err != nil {
return err
}