diff options
author | Luke Kanies <luke@madstop.com> | 2008-09-16 11:41:48 -0500 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2008-09-16 11:41:48 -0500 |
commit | a1a670b305252b2f4b4b2b0020303143addc3eb8 (patch) | |
tree | f64c80cc62941670dd2a4c12d88a99e5e24dd49d /lib | |
parent | dd4f65478c23eaeb56dcef588f96bfdd31557080 (diff) | |
download | puppet-a1a670b305252b2f4b4b2b0020303143addc3eb8.tar.gz puppet-a1a670b305252b2f4b4b2b0020303143addc3eb8.tar.xz puppet-a1a670b305252b2f4b4b2b0020303143addc3eb8.zip |
Fixed #1572 -- file purging now fails if remote sources do not exist.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/type/file.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/puppet/type/file.rb b/lib/puppet/type/file.rb index 3518e8bb3..875f8c370 100644 --- a/lib/puppet/type/file.rb +++ b/lib/puppet/type/file.rb @@ -849,6 +849,8 @@ module Puppet # Keep track of all the files we found in the source, so we can purge # appropriately. sourced = [] + + success = false @parameters[:source].should.each do |source| sourceobj, path = uri2obj(source) @@ -863,6 +865,8 @@ module Puppet if desc == "" next end + + success = true # Now create a new child for every file returned in the list. result += desc.split("\n").collect { |line| @@ -898,6 +902,11 @@ module Puppet return [result, sourced] end end + + unless success + raise Puppet::Error, "None of the provided sources exist" + end + return [result, sourced] end |