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

caddyfile: Normalize line endings before comparing fmt result #4103

Merged
merged 1 commit into from
Apr 2, 2021

Conversation

francislavoie
Copy link
Member

This is a minor bug I noticed when working on Windows; caddy fmt always outputs unix line endings (LF), so if a Caddyfile crafted on Windows with CRLF line endings, the input is not formatted with 'caddy fmt' warning would always appear.

This change normalizes the input Caddyfile to LF line endings to avoid this problem when comparing.

@francislavoie francislavoie added the bug 🐞 Something isn't working label Apr 2, 2021
@francislavoie francislavoie added this to the v2.4.0 milestone Apr 2, 2021
@francislavoie francislavoie requested a review from mholt April 2, 2021 06:37
Copy link
Member

@mholt mholt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks!

@mholt mholt merged commit 3401f91 into caddyserver:master Apr 2, 2021
@francislavoie francislavoie deleted the fmt-warning-windows branch April 2, 2021 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐞 Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants