lib/pre-commit/configuration/providers.rb in pre-commit-0.32.0 vs lib/pre-commit/configuration/providers.rb in pre-commit-0.33.0
- old
+ new
@@ -41,12 +41,10 @@
def plugins
@plugins ||= @pluginator['configuration/providers'].sort_by(&:priority).map(&:new)
end
def find_update_plugin(plugin_name)
- plugin = plugins.detect{|plugin| class2string(class2name(plugin.class)) == plugin_name.to_s}
- raise PluginNotFound.new("Plugin not found for #{plugin_name}.") unless plugin
- plugin
+ plugins.detect{|plugin| class2string(class2name(plugin.class)) == plugin_name.to_s} || raise(PluginNotFound.new("Plugin not found for #{plugin_name}."))
end
end
end
end