HomePhorge

(#6107) Fix an error when auditing a file with empty content
fd73874147a1Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(#6107) Fix an error when auditing a file with empty content

The manifest:

file { "/tmp/foo" :

ensure => present,
audit => content,

}

produced the error:

err: /Stage[main]//File[/tmp/foo]/ensure: change from absent to present
failed: Could not retrieve content for from filebucket: private method `sub' called for nil:NilClass at
/Users/matthewrobinson/work/puppet/test.pp:4

This was due to logic in content assuming that if you didn't specify
content while you were auditing it you must have specified a source.

The code paths in the file type badly need a cleanup so that these sorts
of errors aren't so difficult to track down and things are easier to
test.

Paired-with: Daniel Pittman

Details

Provenance
Matt Robinson <matt@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPUf135a6436084: Merge branch 'bug/2.6.next/5755' into 2.6.next
Branches
Unknown
Tags
Unknown

Event Timeline

Matt Robinson <matt@puppetlabs.com> committed rPUfd73874147a1: (#6107) Fix an error when auditing a file with empty content (authored by Matt Robinson <matt@puppetlabs.com>).Feb 2 2011, 12:30 AM