summaryrefslogtreecommitdiff
path: root/cmd/ponzu/options.go
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2016-11-02 21:23:08 -0700
committerSteve Manuel <nilslice@gmail.com>2016-11-02 21:23:08 -0700
commite8c1b1b789c11650911f424394945f1510c28340 (patch)
treee22c5d7169cd40904966efbfadde51c80b21a2c9 /cmd/ponzu/options.go
parent71645c890feef23cacafaa3e7ef7f9cd5596ec35 (diff)
testing err for ponzu new newline
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
}