-
Notifications
You must be signed in to change notification settings - Fork 774
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
🐛 BUG: CRLF line endings in comments causes an error #915
Comments
Example reproduction (on Windows) - uses the https://github.com/cloudflare/rustwasm-worker-template/blob/master/wrangler.toml template since it's the one I first encountered the issue on.
|
Great catch, looks like an issue with our parser iarna/iarna-toml#33 I'll work on a fix soon. |
petebacondarwin
added a commit
to petebacondarwin/wrangler2
that referenced
this issue
May 9, 2022
The TOML parser that Wrangler uses crashes if there is a Windows line-ending in a comment. See iarna/iarna-toml#33. According to the TOML spec, we should be able to normalize line-endings as we see fit. See https://toml.io/en/v1.0.0#:~:text=normalize%20newline%20to%20whatever%20makes%20sense. This change normalizes line-endings of TOML strings before parsing to avoid hitting this bug. Fixes cloudflare#915
threepointone
pushed a commit
that referenced
this issue
May 9, 2022
The TOML parser that Wrangler uses crashes if there is a Windows line-ending in a comment. See iarna/iarna-toml#33. According to the TOML spec, we should be able to normalize line-endings as we see fit. See https://toml.io/en/v1.0.0#:~:text=normalize%20newline%20to%20whatever%20makes%20sense. This change normalizes line-endings of TOML strings before parsing to avoid hitting this bug. Fixes #915
Repository owner
moved this from In Review
to Done
in workers-sdk
May 9, 2022
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of
Wrangler
are you using?0.0.30
What operating system are you using?
Windows
Describe the Bug
Comments in
wrangler.toml
files saved withCRLF
line endings cause an error.Example
wrangler.toml
LF
line endings, there are no issues.CRLF
line endings, an error is thrown.Error
The text was updated successfully, but these errors were encountered: