esp-idf-template
esp-idf-template copied to clipboard
Both generated scripts (build.sh and flash.sh) won't work when running template on Windows and using Dev Containers/WSL
trafficstars
Bug description
Both generated scripts (build.sh and flash.sh) won't work when running template on Windows and using Dev Containers support. The problem is that .sh files on Windows are created using CR/LF, while Linux expects only LF. Saving .sh files in Windows using LF or in Linux does the trick.
- Would you like to work on a fix? [y/n] I'd say yes, but have almost no experience with Rush so far. I might try but don't count on me too much.
To Reproduce
Run the template on Windows, use Dev Containers. Open the project in VS Code within container, try running build or build & flash.
Expected behavior
Both build and build & flash tasks should run.
Screenshots
Environment
- OS: Windows 10/WSL2
Additional context
Thanks for reporting the issue, just did a quick test and using sed -i 's/\r$//' scripts/build.sh seems to solve the issue in WIndows.