Skip to content

Commit

Permalink
Rescue ::Bundler::GemfileNotFound if sorbet-statis is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
oneearedrabbit authored Sep 13, 2024
1 parent 2d33fcf commit f557ed6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f557ed6

Please sign in to comment.