Fix code analyzer warnings

This commit is contained in:
2024-12-30 13:20:27 -05:00
parent 5f9cc58ef7
commit 888ee5ea4a
5 changed files with 8 additions and 7 deletions

View File

@@ -5,6 +5,7 @@ import (
"time"
git "github.com/go-git/go-git/v5"
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/projects"
)
@@ -31,7 +32,7 @@ func (c *Cache) OpenProject(ctx context.Context, project *projects.Project) *git
// Check to make sure we can connect before we time out
// shouldn't be necessary, but go-git does not properly
// honor its context
if err := project.CheckHost(projects.GitProtoSSH); err != nil {
if err = project.CheckHost(projects.GitProtoSSH); err != nil {
c.log.Fatal("Git remote unreachable, giving up", c.log.Args("error", err))
}