Skip to content

Commit

Permalink
remove directory if not repository
Browse files Browse the repository at this point in the history
  • Loading branch information
cooperspencer committed Dec 27, 2023
1 parent fb93047 commit be42d17
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
}

if err == git.ErrRepositoryNotExists {
dir, _ := filepath.Abs(repo.Name)
sub.Warn().
Str("repo", repo.Name).
Msgf("removing %s", dir)
os.RemoveAll(repo.Name)
}

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

Expand Down

0 comments on commit be42d17

Please sign in to comment.