From f557ed6c1d69e848b9ed1c618b47471d8701968e Mon Sep 17 00:00:00 2001 From: oneearedrabbit Date: Thu, 12 Sep 2024 22:14:55 -0400 Subject: [PATCH] Rescue ::Bundler::GemfileNotFound if sorbet-statis is not found --- lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb b/lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb index c3c10f37..ea1b0cd7 100644 --- a/lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb +++ b/lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb @@ -44,7 +44,7 @@ def target_sorbet_static_version_from_bundler_lock_file def read_sorbet_static_version_from_bundler_lock_file require "bundler" ::Bundler.locked_gems.specs.find { |spec| spec.name == "sorbet-static" }&.version - rescue LoadError, Bundler::GemfileNotFound + rescue LoadError, ::Bundler::GemfileNotFound nil end end