summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/application/resource.rb3
-rw-r--r--lib/puppet/type/file.rb4
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/puppet/application/resource.rb b/lib/puppet/application/resource.rb
index f55caa58a..bc4faf5e4 100644
--- a/lib/puppet/application/resource.rb
+++ b/lib/puppet/application/resource.rb
@@ -81,6 +81,9 @@ class Puppet::Application::Resource < Puppet::Application
[ Puppet::Resource.new( type, name, :parameters => params ).save( key ) ]
end
else
+ if type == "file"
+ raise "Listing all file instances is not supported. Please specify a file or directory, e.g. puppet resource file /etc"
+ end
Puppet::Resource.search( key, {} )
end.map(&format).join("\n")
diff --git a/lib/puppet/type/file.rb b/lib/puppet/type/file.rb
index 630ebe5de..e91929cf8 100644
--- a/lib/puppet/type/file.rb
+++ b/lib/puppet/type/file.rb
@@ -310,8 +310,8 @@ Puppet::Type.newtype(:file) do
super(path.gsub(/\/+/, '/').sub(/\/$/, ''))
end
- def self.instances(base = '/')
- return self.new(:name => base, :recurse => true, :recurselimit => 1, :audit => :all).recurse_local.values
+ def self.instances
+ return []
end
@depthfirst = false