summaryrefslogtreecommitdiff
path: root/cmd/ponzu/options.go
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2016-11-02 19:25:39 -0700
committerSteve Manuel <nilslice@gmail.com>2016-11-02 19:25:39 -0700
commitf8654f31698ddacb687b71c8f2bf0b3adff60609 (patch)
tree2d0565f78c0fd0393450d0730b62344f104ade9f /cmd/ponzu/options.go
parenta4e236d3100c92633fc796e86a39e63e9134161c (diff)
parentfe445ef5f3ccf8c989e9581046abc0590442081c (diff)
Merge branch 'ponzu-dev'
Diffstat (limited to 'cmd/ponzu/options.go')
-rw-r--r--cmd/ponzu/options.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/cmd/ponzu/options.go b/cmd/ponzu/options.go
index b23ab2d..3790010 100644
--- a/cmd/ponzu/options.go
+++ b/cmd/ponzu/options.go
@@ -175,7 +175,7 @@ func newProjectInDir(path string) error {
answer = strings.ToLower(answer)
switch answer {
- case "n", "no", "":
+ case "n", "no", "\r\n", "\n", "":
fmt.Println("")
case "y", "yes":
@@ -288,6 +288,14 @@ func createProjInDir(path string) error {
return err
}
+ // TODO: remove .git from ponzu project path
+ gitDir := filepath.Join(path, ".git")
+ fmt.Println(gitDir)
+ err = os.RemoveAll(gitDir)
+ if err != nil {
+ fmt.Println("Failed to remove .git directory from your project path. Consider removing it manually.")
+ }
+
fmt.Println("New ponzu project created at", path)
return nil
}