postmark-cli icon indicating copy to clipboard operation
postmark-cli copied to clipboard

Normalize to LF endings

Open RickCogley opened this issue 3 years ago • 1 comments

Hi - thank you for this tool. In cobbling together a backup script to make sure I have my Postmark templates backed up, I noticed that you have a mix of CRLF (.html, .txt) and LF (.json) line endings in the file output from the pull command.

For now I just adjusted my `.gitattributes', but imo it would be good if they were normalized to, dare I say, LF?

If it's possible, given that we can also push those same files, I hope you can consider.

RickCogley avatar Sep 29 '21 06:09 RickCogley

Agreed. For now, I simply do the normalization/conversion to LF manually:

find . -type f | xargs dos2unix

It does cause all the templates to be "modified" the first time they are pushed, but otherwise doesn't seem to cause any issues.

rocketraman avatar Feb 26 '22 05:02 rocketraman

@RickCogley I think we're storing on disk whatever we receive from Postmark so a normalization could create unnecessary diffs we'd need to deal with. I'm not convinced we need to add it to this tool, but feel free to submit a PR if you feel strongly about it.

tomek-ac avatar Feb 02 '24 01:02 tomek-ac