From: Jean-Philippe Lang Date: Fri, 15 Mar 2019 08:01:47 +0000 (+0000) Subject: Merged r17960 to 4.0-stable (#31030). X-Git-Tag: 4.0.3~10 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8caee099ede8be7b0d6ecc9e42d6fc4903885fc2;p=redmine.git Merged r17960 to 4.0-stable (#31030). git-svn-id: http://svn.redmine.org/redmine/branches/4.0-stable@17961 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/lib/redmine/plugin.rb b/lib/redmine/plugin.rb index 073eb3eb6..ccfb6c4d0 100644 --- a/lib/redmine/plugin.rb +++ b/lib/redmine/plugin.rb @@ -269,7 +269,11 @@ module Redmine arg = { :version_or_higher => arg } unless arg.is_a?(Hash) arg.assert_valid_keys(:version, :version_or_higher) - plugin = Plugin.find(plugin_name) + begin + plugin = Plugin.find(plugin_name) + rescue PluginNotFound + raise PluginRequirementError.new("#{id} plugin requires the #{plugin_name} plugin") + end current = plugin.version.split('.').collect(&:to_i) arg.each do |k, v|