summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Delano <stephen@opscode.com>2012-08-23 15:54:11 -0700
committerStephen Delano <stephen@opscode.com>2012-08-23 15:54:11 -0700
commitb6c6342cb91cfb45cd80684b177f9980bac63786 (patch)
treefb49aee360e617c37784a8fff5ff88f1e8bb7389
parenta77c5ae6dd24af6c06035fb3df0284b8a4a9c265 (diff)
parent12fc9befe7e7ff8fc1365c5110e139640f92e953 (diff)
downloadchef-b6c6342cb91cfb45cd80684b177f9980bac63786.tar.gz
Merge pull request #374 from opscode/10-stable-CHEF-3276
CHEF-3276: rubygem's provider incorrectly handles options ...
-rw-r--r--chef/lib/chef/provider/package/rubygems.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/chef/lib/chef/provider/package/rubygems.rb b/chef/lib/chef/provider/package/rubygems.rb
index acefdc321d..e60d73ab62 100644
--- a/chef/lib/chef/provider/package/rubygems.rb
+++ b/chef/lib/chef/provider/package/rubygems.rb
@@ -345,6 +345,11 @@ class Chef
elsif is_omnibus? && (!@new_resource.instance_of? Chef::Resource::ChefGem)
# 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 = "options should be a string instead of a hash\n"
+ msg << "in #{new_resource} from #{new_resource.source_line}"
+ raise ArgumentError, msg
+ end
gem_location = find_gem_by_path
@new_resource.gem_binary gem_location
@gem_env = AlternateGemEnvironment.new(gem_location)