diff options
-rw-r--r-- | cmd/ponzu/options.go | 10 |
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 } |