Skip to content

Commit

Permalink
Merge pull request #262 from oneearedrabbit/patch-1
Browse files Browse the repository at this point in the history
Rescue ::Bundler::GemfileNotFound if sorbet-static is not found
  • Loading branch information
Morriar authored Sep 13, 2024
2 parents 2d33fcf + f557ed6 commit f4ca5d4
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 f4ca5d4

Please sign in to comment.