From d06439cccc9f6a621371738dad17c898de9371ba Mon Sep 17 00:00:00 2001 From: ishua Date: Sun, 12 May 2024 17:13:40 +0300 Subject: [PATCH] fix panic --- fsnotes/internal/clients/mygit/git.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fsnotes/internal/clients/mygit/git.go b/fsnotes/internal/clients/mygit/git.go index 47e942c..6b5f04b 100644 --- a/fsnotes/internal/clients/mygit/git.go +++ b/fsnotes/internal/clients/mygit/git.go @@ -48,9 +48,12 @@ func (r *Repo) Pull(ctx context.Context) error { Password: r.Token, }, RemoteName: "origin"}) - if err.Error() == "already up-to-date" { - err = nil + if err != nil { + if err.Error() == "already up-to-date" { + err = nil + } } + return err }