HomePhorge

(PUP-927) Read preserving line endings
e9b25b55b81eUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(PUP-927) Read preserving line endings

Previously, puppet's built in file and template functions would
read file contents using File.read. This would not cause problems
on *nix but could cause EOL conversion from \r\n to \n on Windows.

Add Puppet::FileSystem.read_preserve_line_endings for cases where line
endings are important and use :mode => 'rb' checking first against utf-8
encoding, falling back to default_external when not valid, and falling back
to File.read when all else fails.

Details

Provenance
Rob Reynolds <ferventcoder@gmail.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU8c6c36dcdb55: Merge remote-tracking branch 'upstream/pr/3713' into stable
Branches
Unknown
Tags
Unknown

Event Timeline

Rob Reynolds <ferventcoder@gmail.com> committed rPUe9b25b55b81e: (PUP-927) Read preserving line endings (authored by Rob Reynolds <ferventcoder@gmail.com>).Mar 17 2015, 9:33 PM