Skip to content

Commit

Permalink
remove repo if initial clone goes wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
cooperspencer committed Dec 31, 2023
1 parent b1abecb commit a980827
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions local/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,14 @@ func Locally(repo types.Repo, l types.Local, dry bool) bool {
break
}

err = os.RemoveAll(repo.Name)
if err != nil {
dir, _ := filepath.Abs(repo.Name)
sub.Warn().
Str("repo", repo.Name).Err(err).
Msgf("couldn't remove %s", types.Red(dir))
}

sub.Warn().Err(err).
Msgf("retry %s from %s", types.Red(x), types.Red(tries))

Expand Down

0 comments on commit a980827

Please sign in to comment.