Skip to content

Commit

Permalink
minor FIX clean the local path before cloning the repo (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
SlevinWasAlreadyTaken authored Jun 16, 2023
1 parent a4963e8 commit 930f0a5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions internal/git/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ func NewRepository(
authorName: authorName,
}

// first clean any remains for older sync that went wrong
// ignore errors
_ = r.Clean()

// try to clone to local path
opt := &git.CloneOptions{
URL: r.repoURL,
Expand Down
2 changes: 1 addition & 1 deletion internal/sync/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func Do(ctx context.Context, repoFullname string, c *cfg.Config, ghClient *githu
c.FilesBindings,
)
if err != nil {
return fmt.Errorf("create repo manager: %v", err)
return fmt.Errorf("creating task: %v", err)
}

// ensure we clean data at the end of the sync
Expand Down

0 comments on commit 930f0a5

Please sign in to comment.