bin/overcommit in overcommit-0.58.0 vs bin/overcommit in overcommit-0.59.0

- old
+ new

@@ -16,18 +16,19 @@ $stderr = File.new(File::NULL, 'w') Bundler.setup ensure $stderr = old_stderr end - rescue Bundler::BundlerError => ex - puts "Problem loading '#{gemfile}': #{ex.message}" - puts "Try running:\nbundle install --gemfile=#{gemfile}" if ex.is_a?(Bundler::GemNotFound) + rescue Bundler::BundlerError => e + puts "Problem loading '#{gemfile}': #{e.message}" + puts "Try running:\nbundle install --gemfile=#{gemfile}" if e.is_a?(Bundler::GemNotFound) exit 78 # EX_CONFIG - rescue Gem::LoadError => ex + rescue Gem::LoadError => e # Handle case where user is executing overcommit without `bundle exec` and # whose local Gemfile has a gem requirement that does not match a gem # requirement of the installed version of Overcommit. - raise unless ex.message =~ /already activated/i + raise unless e.message =~ /already activated/i + exec('bundle', 'exec', $0, *ARGV) end end begin