summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-05-31 10:54:20 -0700
committerGitHub <noreply@github.com>2018-05-31 10:54:20 -0700
commitc930e357b67f6ec4ddd015a6d43c5a7453d0983c (patch)
treec238626f5c0172c11af74b428714343f5b269493
parentd4a255a7525a4ac426d3ddd4655c6edf4053c781 (diff)
parentc57666e8128e291fa3be6a383648dfcbe8923b84 (diff)
downloadchef-c930e357b67f6ec4ddd015a6d43c5a7453d0983c.tar.gz
Merge pull request #7326 from chef/official_knife_plugins
Better errors with uninstalled official knife plugins
-rw-r--r--lib/chef/knife.rb9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/chef/knife.rb b/lib/chef/knife.rb
index 1e436f0fe6..dfaecb34cd 100644
--- a/lib/chef/knife.rb
+++ b/lib/chef/knife.rb
@@ -234,7 +234,7 @@ class Chef
end
end
- OFFICIAL_PLUGINS = %w{ec2 rackspace windows openstack terremark bluebox}
+ OFFICIAL_PLUGINS = %w{ec2 rackspace windows openstack azure google linode push vcenter lpar}
class << self
def list_commands(preferred_category = nil)
@@ -258,7 +258,6 @@ class Chef
caller_line.split(/:\d+/).first
end
- # :nodoc:
# Error out and print usage. probably because the arguments given by the
# user could not be resolved to a subcommand.
# @api private
@@ -272,10 +271,8 @@ class Chef
if category_commands = guess_category(args)
list_commands(category_commands)
- elsif missing_plugin = ( OFFICIAL_PLUGINS.find { |plugin| plugin == args[0] } )
- ui.info("The #{missing_plugin} commands were moved to plugins in Chef 0.10")
- ui.info("You can install the plugin with `(sudo) gem install knife-#{missing_plugin}`")
- ui.info("Use `chef gem install knife-#{missing_plugin}` instead if using ChefDK")
+ elsif OFFICIAL_PLUGINS.include?(args[0]) # command was an uninstalled official chef knife plugin
+ ui.info("Use `chef gem install knife-#{args[0]}` to install the plugin into ChefDK")
else
list_commands
end