def load_plugins
      UI.verbose("Checking if there are any plugins that should be loaded...")

      loaded_plugins = false
      available_plugins.each do |gem_name|
        UI.verbose("Loading '#{gem_name}' plugin")
        begin
          # BEFORE requiring the gem, we get a list of loaded actions
          # This way we can check inside `store_plugin_reference` if
          # any actions were overwritten
          self.loaded_fastlane_actions.concat(Fastlane::Actions.constants)

          FastlaneRequire.install_gem_if_needed(gem_name: gem_name, require_gem: true)

          store_plugin_reference(gem_name)
          loaded_plugins = true
        rescue StandardError, ScriptError => ex # some errors, like ScriptError are not caught unless explicitly
          UI.error("Error loading plugin '#{gem_name}': #{ex}")

          # We'll still add it to the table, to make the error
          # much more visible and obvious
          self.plugin_references[gem_name] = {
            version_number: Fastlane::ActionCollector.determine_version(gem_name),
            actions: []
          }
        end
      end

      if !loaded_plugins && self.pluginfile_content.to_s.include?(PluginManager.plugin_prefix)
        UI.error("It seems like you wanted to load some plugins, however they couldn't be loaded")
        UI.error("Please follow the troubleshooting guide: #{TROUBLESHOOTING_URL}")
      end

      skip_print_plugin_info = self.plugin_references.empty? || CLIToolsDistributor.running_version_command? || FastlaneCore::Env.truthy?("FASTLANE_ENV_PRINTER")

      # We want to avoid printing output other than the version number if we are running `fastlane -v`
      print_plugin_information(self.plugin_references) unless skip_print_plugin_info
    end
def load_plugins
      UI.verbose("Checking if there are any plugins that should be loaded...")

      loaded_plugins = false
      available_plugins.each do |gem_name|
        UI.verbose("Loading '#{gem_name}' plugin")
        begin
          # BEFORE requiring the gem, we get a list of loaded actions
          # This way we can check inside `store_plugin_reference` if
          # any actions were overwritten
          self.loaded_fastlane_actions.concat(Fastlane::Actions.constants)

          FastlaneRequire.install_gem_if_needed(gem_name: gem_name, require_gem: true)

          store_plugin_reference(gem_name)
          loaded_plugins = true
        rescue StandardError, ScriptError => ex # some errors, like ScriptError are not caught unless explicitly
          UI.error("Error loading plugin '#{gem_name}': #{ex}")

          # We'll still add it to the table, to make the error
          # much more visible and obvious
          self.plugin_references[gem_name] = {
            version_number: Fastlane::ActionCollector.determine_version(gem_name),
            actions: []
          }
        end
      end

      if !loaded_plugins && self.pluginfile_content.to_s.include?(PluginManager.plugin_prefix)
        UI.error("It seems like you wanted to load some plugins, however they couldn't be loaded")
        UI.error("Please follow the troubleshooting guide: #{TROUBLESHOOTING_URL}")
      end

      skip_print_plugin_info = self.plugin_references.empty? || CLIToolsDistributor.running_version_command? || FastlaneCore::Env.truthy?("FASTLANE_ENV_PRINTER")

      # We want to avoid printing output other than the version number if we are running `fastlane -v`
      print_plugin_information(self.plugin_references) unless skip_print_plugin_info
    end
@!group Requiring the plugins

 Iterate over all available plugins
 which follow the naming convention
   fastlane-plugin-[plugin_name]
 This will make sure to load the action
 and all its helpers