fastlane/lib/fastlane/plugins/plugin_manager.rb in fastlane-2.134.0 vs fastlane/lib/fastlane/plugins/plugin_manager.rb in fastlane-2.135.0
- old
+ new
@@ -276,11 +276,11 @@
# 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
- def load_plugins
+ def load_plugins(print_table: true)
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")
@@ -309,21 +309,24 @@
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")
+ skip_print_plugin_info = self.plugin_references.empty? || CLIToolsDistributor.running_version_command? || !print_table
# 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
# Prints a table all the plugins that were loaded
def print_plugin_information(references)
+ no_action_found = false
+
rows = references.collect do |current|
if current[1][:actions].empty?
# Something is wrong with this plugin, no available actions
+ no_action_found = true
[current[0].red, current[1][:version_number], "No actions found".red]
else
[current[0], current[1][:version_number], current[1][:actions].join("\n")]
end
end
@@ -333,9 +336,16 @@
rows: FastlaneCore::PrintTable.transform_output(rows),
title: "Used plugins".green,
headings: ["Plugin", "Version", "Action"]
}))
puts("")
+
+ if no_action_found
+ puts("[!] No actions were found while loading one or more plugins".red)
+ puts(" Please use `bundle exec fastlane` with plugins".red)
+ puts(" More info - https://docs.fastlane.tools/plugins/using-plugins/#run-with-plugins".red)
+ puts("")
+ end
end
#####################################################
# @!group Reference between plugins to actions
#####################################################