ActiveCampaign / postmark-cli

The official CLI tool for Postmark
https://postmarkapp.com
MIT License
79 stars 9 forks source link

Normalize to LF endings #50

Closed RickCogley closed 9 months ago

RickCogley commented 3 years ago

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.

rocketraman commented 2 years ago

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.

tomek-ac commented 9 months ago

@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.