mirror of
https://github.com/elastic/logstash.git
synced 2025-04-23 22:27:21 -04:00
Show errors encountered when validating a plugin rather than saying it does not exist
Fixes #3407
This commit is contained in:
parent
43d0d92400
commit
93882095e4
1 changed files with 5 additions and 2 deletions
|
@ -17,7 +17,10 @@ module LogStash::PluginManager
|
|||
end
|
||||
else
|
||||
dep = Gem::Dependency.new(plugin, version || Gem::Requirement.default)
|
||||
specs, error = Gem::SpecFetcher.fetcher.spec_for_dependency(dep)
|
||||
specs, errors = Gem::SpecFetcher.fetcher.spec_for_dependency(dep)
|
||||
|
||||
# dump errors
|
||||
errors.each { |error| $stderr.puts(error.wordy) }
|
||||
|
||||
# depending on version requirements, multiple specs can be returned in which case
|
||||
# we will grab the one with the highest version number
|
||||
|
@ -27,7 +30,7 @@ module LogStash::PluginManager
|
|||
end
|
||||
return valid
|
||||
else
|
||||
$stderr.puts("Plugin #{plugin}" + (version ? " version #{version}" : "") + " does not exist")
|
||||
$stderr.puts("Plugin #{plugin}" + (version ? " version #{version}" : "") + " does not exist") if errors.empty?
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue