summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2017-12-31 04:15:32 -0700
committerSteve Manuel <nilslice@gmail.com>2017-12-31 04:17:00 -0700
commit7a64412d2bddd9f65215da0faab5b27a2b614ecb (patch)
tree0c4194e161f91e82b4008d1b929f2b071ac300af
parent4813ff8e0a25cb8ebc30c9cf5c6393e2726dbcd4 (diff)
[cli] add .circleci to paths for post-new removal
-rw-r--r--cmd/ponzu/new.go12
1 files changed, 8 insertions, 4 deletions
diff --git a/cmd/ponzu/new.go b/cmd/ponzu/new.go
index 2f16a53..058fdf6 100644
--- a/cmd/ponzu/new.go
+++ b/cmd/ponzu/new.go
@@ -183,10 +183,14 @@ func createProjectInDir(path string) error {
return err
}
- gitDir := filepath.Join(path, ".git")
- err = os.RemoveAll(gitDir)
- if err != nil {
- fmt.Println("Failed to remove .git directory from your project path. Consider removing it manually.")
+ // remove non-project files and directories
+ rmPaths := []string{".git", ".circleci"}
+ for _, rm := range rmPaths {
+ dir := filepath.Join(path, rm)
+ err = os.RemoveAll(dir)
+ if err != nil {
+ fmt.Println("Failed to remove directory from your project path. Consider removing it manually:", dir)
+ }
}
fmt.Println("New ponzu project created at", path)