From d57f0992d354503e9469db26320760421c869c5d Mon Sep 17 00:00:00 2001 From: Nicolas QUINQUENEL Date: Fri, 13 Sep 2024 10:59:05 +0200 Subject: [PATCH] SLI-1591 Check if git4idea available in Rider --- .../intellij/rider/RiderSolutionGitRepoProvider.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rider/src/main/java/org/sonarlint/intellij/rider/RiderSolutionGitRepoProvider.kt b/rider/src/main/java/org/sonarlint/intellij/rider/RiderSolutionGitRepoProvider.kt index 2a6562e2d..0d9177209 100644 --- a/rider/src/main/java/org/sonarlint/intellij/rider/RiderSolutionGitRepoProvider.kt +++ b/rider/src/main/java/org/sonarlint/intellij/rider/RiderSolutionGitRepoProvider.kt @@ -34,7 +34,11 @@ import org.sonarlint.intellij.git.GitRepo class RiderSolutionGitRepoProvider : ModuleVcsRepoProvider { override fun getRepoFor(module: Module): VcsRepo? { - val repositoryManager = GitRepositoryManager.getInstance(module.project) + val repositoryManager = try { + GitRepositoryManager.getInstance(module.project) + } catch (e: NoClassDefFoundError) { + return null + } val moduleRepositories = mutableSetOf() val visitor = object : ProjectModelEntityVisitor() {