diff options
author | Luke Kanies <luke@madstop.com> | 2009-03-10 00:32:36 -0500 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2009-03-10 00:32:36 -0500 |
commit | 90afd48c39bc7bbb8e7afa81a49d2f814a787565 (patch) | |
tree | fc72b168751f90c0606b9daae7a1994d7bc17497 | |
parent | 858480b04d84e56aa483c80642dd0512af4fd025 (diff) | |
download | puppet-90afd48c39bc7bbb8e7afa81a49d2f814a787565.tar.gz puppet-90afd48c39bc7bbb8e7afa81a49d2f814a787565.tar.xz puppet-90afd48c39bc7bbb8e7afa81a49d2f814a787565.zip |
Not passing file sources on to child files
This was sometimes causing files to get converted to
directories.
Signed-off-by: Luke Kanies <luke@madstop.com>
-rw-r--r-- | lib/puppet/type/file.rb | 2 | ||||
-rwxr-xr-x | spec/unit/type/file.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/puppet/type/file.rb b/lib/puppet/type/file.rb index 3be96ff2d..7d37fe865 100644 --- a/lib/puppet/type/file.rb +++ b/lib/puppet/type/file.rb @@ -479,7 +479,7 @@ module Puppet options = @original_parameters.merge(:path => full_path, :implicit => true).reject { |param, value| value.nil? } # These should never be passed to our children. - [:parent, :ensure, :recurse, :target, :alias].each do |param| + [:parent, :ensure, :recurse, :target, :alias, :source].each do |param| options.delete(param) if options.include?(param) end diff --git a/spec/unit/type/file.rb b/spec/unit/type/file.rb index 01199d0d0..2be388f8e 100755 --- a/spec/unit/type/file.rb +++ b/spec/unit/type/file.rb @@ -598,7 +598,7 @@ describe Puppet::Type.type(:file) do @file.newchild("my/path") end - {:recurse => true, :target => "/foo/bar", :ensure => :present, :alias => "yay"}.each do |param, value| + {:recurse => true, :target => "/foo/bar", :ensure => :present, :alias => "yay", :source => "/foo/bar"}.each do |param, value| it "should not pass on #{param} to the sub resource" do @file = Puppet::Type::File.new(:name => @path, param => value, :catalog => @catalog) |