diff options
author | Steve Manuel <nilslice@gmail.com> | 2016-11-02 19:24:25 -0700 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2016-11-02 19:24:25 -0700 |
commit | fe445ef5f3ccf8c989e9581046abc0590442081c (patch) | |
tree | 2d0565f78c0fd0393450d0730b62344f104ade9f | |
parent | a741e3cc85759c8aabc73427b276aaf46f0a12ee (diff) |
test remove .git directory from new ponzu project
-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 } |