diff options
Diffstat (limited to 'lib/chef/mixin/get_source_from_package.rb')
-rw-r--r-- | lib/chef/mixin/get_source_from_package.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/chef/mixin/get_source_from_package.rb b/lib/chef/mixin/get_source_from_package.rb index 6d5cb56a27..2ed251854a 100644 --- a/lib/chef/mixin/get_source_from_package.rb +++ b/lib/chef/mixin/get_source_from_package.rb @@ -29,6 +29,7 @@ class Chef module GetSourceFromPackage def initialize(new_resource, run_context) super + return if new_resource.package_name.is_a?(Array) # if we're passed something that looks like a filesystem path, with no source, use it # - require at least one '/' in the path to avoid gem_package "foo" breaking if a file named 'foo' exists in the cwd if new_resource.source.nil? && new_resource.package_name.match(/#{::File::SEPARATOR}/) && ::File.exists?(new_resource.package_name) |