lib/pluginmanager/install.rb
# the install logic below support installing multiple plugins with each a version specification
# but the argument parsing does not support it for now so currently if specifying --version only
# one plugin name can be also specified.
the install logic below support installing multiple plugins with each a version specification
but the argument parsing does not support it for now so currently if specifying --version only
one plugin name can be also specified.
the install logic below support installing multiple plugins with each a version specification but the argument parsing does not support it for now so currently if specifying -- version only one plugin name can be also specified .
def execute
    ENV["JARS_SKIP"] = "true" if local?
    begin
      if strategy = LogStash::PluginManager::InstallStrategyFactory.create(plugins_arg)
        LogStash::PluginManager.ui.debug("Installing with strategy: #{strategy.class}")
        strategy.execute
        return
      end
    rescue LogStash::PluginManager::InstallError => e
      report_exception("An error occured when installing the: #{plugins_args_human}, to have more information about the error add a DEBUG=1 before running the command.", e.original_exception)
      return
    rescue LogStash::PluginManager::FileNotFoundError => e
      report_exception("File not found for: #{plugins_args_human}", e)
      return
    rescue LogStash::PluginManager::InvalidPackError => e
      report_exception("Invalid pack for: #{plugins_args_human}, reason: #{e.message}", e)
      return
    rescue => e
      report_exception("Something went wrong when installing #{plugins_args_human}", e)
      return
    end
    validate_cli_options!
    if local_gems?
      gems = extract_local_gems_plugins
    elsif development?
      gems = plugins_development_gems
    else
      gems = plugins_gems
      verify_remote!(gems) if !local? && verify?
    end
    install_gems_list!(gems)
    remove_unused_locally_installed_gems!
  end
def execute ENV [ "JARS_SKIP" ] = "true" if local? begin if strategy = LogStash :: PluginManager :: InstallStrategyFactory . create ( plugins_arg ) LogStash :: PluginManager . ui . debug ( "Installing with strategy: #{strategy.class}" ) strategy . execute return end rescue LogStash :: PluginManager :: InstallError => e report_exception ( "An error occured when installing the: #{plugins_args_human}, to have more information about the error add a DEBUG=1 before running the command." , e . original_exception ) return rescue LogStash :: PluginManager :: FileNotFoundError => e report_exception ( "File not found for: #{plugins_args_human}" , e ) return rescue LogStash :: PluginManager :: InvalidPackError => e report_exception ( "Invalid pack for: #{plugins_args_human}, reason: #{e.message}" , e ) return rescue => e report_exception ( "Something went wrong when installing #{plugins_args_human}" , e ) return end validate_cli_options! if local_gems? gems = extract_local_gems_plugins elsif development? gems = plugins_development_gems else gems = plugins_gems verify_remote! ( gems ) if ! local? && verify? end install_gems_list! ( gems ) remove_unused_locally_installed_gems! end
the install logic below support installing multiple plugins with each a version specification
but the argument parsing does not support it for now so currently if specifying --version only
one plugin name can be also specified.
the install logic below support installing multiple plugins with each a version specification but the argument parsing does not support it for now so currently if specifying -- version only one plugin name can be also specified .
# Turn off any jar dependencies lookup when running with `--local` # This is a special flow for PACK related plugins, # if we dont detect an pack we will just use the normal `Bundle install` Strategy` # this could be refactored into his own strategy # TODO(ph): refactor this into his own strategy