summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2005-11-16 22:17:29 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2005-11-16 22:17:29 +0000
commitc205bf6ba79a905c59eb99747ffe674bbaa11481 (patch)
tree4b045649f13bc4023e7be75185a7c6baa532a3bd /lib
parent69600345c1f092cc55320d52e4e75dccc12b1dac (diff)
downloadpuppet-c205bf6ba79a905c59eb99747ffe674bbaa11481.tar.gz
puppet-c205bf6ba79a905c59eb99747ffe674bbaa11481.tar.xz
puppet-c205bf6ba79a905c59eb99747ffe674bbaa11481.zip
fixing filesources so that the first found file is copied, and adding a test case
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@745 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib')
-rwxr-xr-xlib/puppet/type/pfile/source.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/puppet/type/pfile/source.rb b/lib/puppet/type/pfile/source.rb
index 625458b23..a035878b1 100755
--- a/lib/puppet/type/pfile/source.rb
+++ b/lib/puppet/type/pfile/source.rb
@@ -29,7 +29,9 @@ module Puppet
if value =~ /^[0-9]+$/
value = value.to_i
end
- args[param] = value
+ unless value.nil?
+ args[param] = value
+ end
}
# we can't manage ownership as root, so don't even try
@@ -37,7 +39,11 @@ module Puppet
args.delete(:owner)
end
- return args
+ if args.empty?
+ return nil
+ else
+ return args
+ end
end
# This basically calls describe() on our file, and then sets all