Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(PUP-927) Read preserving line endings #3616

Commits on Feb 18, 2015

  1. (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.
    ferventcoder committed Feb 18, 2015
    Copy the full SHA
    52f447a View commit details
    Browse the repository at this point in the history