wslc doesn't strip \r in << redirection
- Dominant language
- C++
- Stars
- 33.7k
- Forks
- 1.8k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 116
Description
### Windows Version
Microsoft Windows [Version 10.0.26300.8758]
### WSL Version
wslc 2.9.3.0
### Are you using WSL 1 or WSL 2?
- [x] WSL 2
- [ ] WSL 1
### Kernel Version
_No response_
### Distro Version
_No response_
### Other Software
_No response_
### Repro Steps
1. Create a Dockerfile that uses < wslc build -f Dockerfile.test .
Building image from directory: .
[1/2] FROM docker.io/library/debian:trixie
[2/2] RUN < wslc build -f Dockerfile.test .
Building image from directory: .
[1/2] FROM docker.io/library/debian:trixie
[2/2] RUN <>> RUN <>> set -e
4 | >>> touch /tmp/foo
5 | >>> EOF
6 |
--------------------
ERROR: failed to solve: process "/bin/sh -c set -e\r\ntouch /tmp/foo\r\n" did not complete successfully: exit code: 2
Error code: E_FAIL
```
### Diagnostic Logs
[WslLogs-2026-07-04_14-45-53.tar.gz](https://github.com/user-attachments/files/29665735/WslLogs-2026-07-04_14-45-53.tar.gz)
Contributor guide
Assessment
This issue has not been assessed yet.