Skip to content
This repository has been archived by the owner on May 27, 2022. It is now read-only.

Commit

Permalink
fix: handle err object not found
Browse files Browse the repository at this point in the history
refs #343

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
  • Loading branch information
caarlos0 committed Mar 23, 2020
1 parent 750ec50 commit ed23102
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion project/git.go
Expand Up @@ -131,7 +131,15 @@ func (g gitProject) Update() error {
Progress: &w,
Force: true,
}); err != nil && err != git.NoErrAlreadyUpToDate {
log.Println("git update failed for", g.folder, g.Version, w.String())
log.Println("git clone failed", err, g.URL, w.String())
if err == plumbing.ErrObjectNotFound {
log.Printf(
"This means your local copy probably is in a funky state (maybe someone force-pushed the repo). "+
"You can fix this by running: `rm -rf %s && antibody bundle %s`",
g.folder,
g.URL,
)
}
return err
}

Expand Down

0 comments on commit ed23102

Please sign in to comment.