Skip to content

Commit

Permalink
Fixes an issue where non-interactive runs fail
Browse files Browse the repository at this point in the history
During non-interactive runs, the incron module would look for incrontab in /root (which is a directory) and yield the following error:
```
Could not prefetch incron provider 'incrontab': Puppet::Util::FileType::FileTypeFlat could not read root: Is a directory - root
Puppet::Util::FileType::FileTypeFlat could not read root: Is a directory - root
```
This patch fixes the behaviour by pointing to the actual location for the incrontab file.
  • Loading branch information
François Conil committed Feb 23, 2015
1 parent ed7f286 commit 2e30399
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/puppet/provider/incron/parsed.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'puppet/provider/parsedfile'

Puppet::Type.type(:incron).provide(:incrontab, :parent => Puppet::Provider::ParsedFile, :default_target => ENV["USER"] || "root", :filetype => :flat) do
Puppet::Type.type(:incron).provide(:incrontab, :parent => Puppet::Provider::ParsedFile, :default_target => ENV["USER"] || "/var/spool/incron/root", :filetype => :flat) do
commands :incrontab => "incrontab"

text_line :comment, :match => %r{^\s*#}, :post_parse => proc { |record|
Expand Down

0 comments on commit 2e30399

Please sign in to comment.