Skip to content

Commit 0147a80

Browse files
committed
Delete .gitignore when git is not used
1 parent 5d19263 commit 0147a80

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmd/new.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ func newClient() error {
224224

225225
func git() error {
226226
if !exec.IsInstalled("git") {
227+
os.Remove(".gitignore")
227228
return nil
228229
}
229230

@@ -233,10 +234,12 @@ func git() error {
233234
return err
234235
}
235236
if !yes {
237+
os.Remove(".gitignore")
236238
return nil
237239
}
238240
out, err := exec.Execute(true, "git", "init")
239241
if err != nil {
242+
os.Remove(".gitignore")
240243
if out != "" {
241244
cli.Error(out)
242245
}

0 commit comments

Comments
 (0)