about summary refs log tree commit diff stats
path: root/internal/vcs/repository.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/vcs/repository.go')
-rw-r--r--internal/vcs/repository.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/internal/vcs/repository.go b/internal/vcs/repository.go
index 5950e53..06a4733 100644
--- a/internal/vcs/repository.go
+++ b/internal/vcs/repository.go
@@ -82,6 +82,9 @@ func (r *Repository) Update() (bool, error) {
 	refs, err := rem.List(&git.ListOptions{
 		Timeout: 5,
 	})
+	if err != nil {
+		return false, err
+	}
 
 	var hash plumbing.Hash
 	for _, ref := range refs {
@@ -94,10 +97,13 @@ func (r *Repository) Update() (bool, error) {
 	if err != nil {
 		return false, err
 	}
-	wt.Checkout(&git.CheckoutOptions{
+	err = wt.Checkout(&git.CheckoutOptions{
 		Hash:  hash,
 		Force: true,
 	})
+	if err != nil {
+		return false, err
+	}
 
 	r.log.Info("updated to", "rev", hash)