From fe445ef5f3ccf8c989e9581046abc0590442081c Mon Sep 17 00:00:00 2001 From: Steve Manuel Date: Wed, 2 Nov 2016 19:24:25 -0700 Subject: test remove .git directory from new ponzu project --- cmd/ponzu/options.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'cmd/ponzu/options.go') 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 } -- cgit v1.2.3