You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
wsl.conf: line continuation is broken when the file uses CRLF line endings #41590
I noticed this while reading src/shared/configfile/configfile.cpp. Inside a value, an escaped \r is meant to be skipped as part of a CRLF line continuation, but only the \r is consumed. The \n that follows is read back by the value loop, which ends the value there.
Put this in /etc/wsl.conf with CRLF line endings (for example after editing it from Windows):
[boot]
command=echo a \
b
[network]
hostname=foo
then restart the distribution.
Expected Behavior
Same result as with LF line endings: boot.command is echo a b and the hostname is foo.
Actual Behavior
boot.command is cut to echo a , the line b is parsed as a key with no =, and because the guest parses wsl.conf without CFG_SKIP_INVALID_LINES, parsing stops at that point. Everything after the continuation (here [network] hostname) is silently ignored.
I have not run this on a live WSL install. I compiled configfile.cpp on its own on Linux against the same content and got:
LF result=0 command='echo a b' hostname='foo'
CRLF result=-1 command='echo a ' hostname=''
If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. Otherwise, please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.
How to collect WSL logs
Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:
The script will output the path of the log file once done.
If this is a networking issue, please use .\collect-wsl-logs.ps1 -LogProfile networking instead, following the instructions in Collect WSL logs for networking issues
Once completed please upload the output files to this GitHub issue.
If you choose to email these logs instead of attaching them to the bug, please send them to [email protected] with the GitHub issue number in the subject, and include a link to your GitHub issue comment in the message body, and reply with '/emailed-logs'.
Activity
github-actions commentedon Sep 12, 2026
Logs are required for review from WSL team
If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
Otherwise, please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.
How to collect WSL logs
Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:
The script will output the path of the log file once done.
If this is a networking issue, please use
.\collect-wsl-logs.ps1 -LogProfile networkinginstead, following the instructions in Collect WSL logs for networking issuesOnce completed please upload the output files to this GitHub issue.
See Collect WSL logs (recommended method).
If you choose to email these logs instead of attaching them to the bug, please send them to [email protected] with the GitHub issue number in the subject, and include a link to your GitHub issue comment in the message body, and reply with '/emailed-logs'.