diff options
author | Stephen Delano <stephen@opscode.com> | 2012-08-23 15:54:11 -0700 |
---|---|---|
committer | Stephen Delano <stephen@opscode.com> | 2012-08-23 15:54:11 -0700 |
commit | b6c6342cb91cfb45cd80684b177f9980bac63786 (patch) | |
tree | fb49aee360e617c37784a8fff5ff88f1e8bb7389 | |
parent | a77c5ae6dd24af6c06035fb3df0284b8a4a9c265 (diff) | |
parent | 12fc9befe7e7ff8fc1365c5110e139640f92e953 (diff) | |
download | chef-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.rb | 5 |
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) |