summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Burkholder <peterb@getchef.com>2015-03-13 10:48:54 -0400
committerPeter Burkholder <peterb@getchef.com>2015-03-13 10:48:54 -0400
commit3198bec3e5a7e5fe0acc3f45c8cedccdf173235f (patch)
tree2b4b3619cbb2a2bb97df5a3e1878f135b923fffa
parentfced6d9e3a0d5806c16d9e1db54cf65199535d40 (diff)
downloadchef-3198bec3e5a7e5fe0acc3f45c8cedccdf173235f.tar.gz
Using warning suggested by @btm
-rw-r--r--lib/chef/provider/package/rubygems.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/chef/provider/package/rubygems.rb b/lib/chef/provider/package/rubygems.rb
index 4b37519d6b..434117884b 100644
--- a/lib/chef/provider/package/rubygems.rb
+++ b/lib/chef/provider/package/rubygems.rb
@@ -380,10 +380,13 @@ class Chef
# Opscode Omnibus - The ruby that ships inside omnibus is only used for Chef
# Default to installing somewhere more functional
if new_resource.options && new_resource.options.kind_of?(Hash)
- msg = "gem_package is for use by the system install of Ruby\n"
- msg << "but the Chef Omnibus Ruby has been detected with an options\n"
- msg << "hash. Use gem_binary attribute or pass a string of options\n"
- msg << "at #{new_resource} from #{new_resource.source_line}"
+ msg = [
+ "Gem options should be passed to gem_package as a string instead of a hash when",
+ "using this installation of Chef because it runs with its own packaged Ruby. A hash",
+ "may only be used when installing a gem to the same Ruby installation that Chef is",
+ "running under. See https://docs.chef.io/resource_gem_package.html for more information.",
+ "Error raised at #{new_resource} from #{new_resource.source_line}",
+ ].join("\n")
raise ArgumentError, msg
end
gem_location = find_gem_by_path