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.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/cmd/ponzu/options.go b/cmd/ponzu/options.go
index 3cd4910..062975b 100644
--- a/cmd/ponzu/options.go
+++ b/cmd/ponzu/options.go
@@ -168,10 +168,12 @@ func newProjectInDir(path string) error {
var answer string
_, err := fmt.Scanf("%s\n", &answer)
- if err.Error() == "unexpected newline" {
- answer = ""
- } else if err != nil {
- return err
+ if err != nil {
+ if err.Error() == "unexpected newline" {
+ answer = ""
+ } else {
+ return err
+ }
}
answer = strings.ToLower(answer)
@@ -179,7 +181,6 @@ func newProjectInDir(path string) error {
switch answer {
case "n", "no", "\r\n", "\n", "":
fmt.Println("")
- fmt.Println(answer)
case "y", "yes":
err := os.RemoveAll(path)