Skip to content

Commit 39aca21

Browse files
committed
Workaround for a bug in go-git
1 parent 95ee7ae commit 39aca21

File tree

1 file changed

+3
-1
lines changed
  • internal/arduino/libraries/librariesmanager

1 file changed

+3
-1
lines changed

internal/arduino/libraries/librariesmanager/install.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,9 @@ func (lmi *Installer) InstallGitLib(argURL string, overwrite bool) error {
232232
return err
233233
} else if w, err := repo.Worktree(); err != nil {
234234
return err
235-
} else if err := w.Checkout(&git.CheckoutOptions{Hash: plumbing.NewHash(h.String())}); err != nil {
235+
} else if err := w.Checkout(&git.CheckoutOptions{
236+
Force: true, // workaround for: https://github.com/go-git/go-git/issues/1411
237+
Hash: plumbing.NewHash(h.String())}); err != nil {
236238
return err
237239
}
238240
}

0 commit comments

Comments
 (0)