The Problem
Contributors developing on Windows were encountering obscure script execution failures when running local Docker builds. The development pipeline was breaking constantly for new open-source contributors.
The Investigation
I dug into the Docker container logs and traced the errors down to bash scripts throwing syntax errors. I realized the issue stemmed from Windows Git implicitly converting line endings to `CRLF`. When these files were loaded into Linux-based containers, the hidden `\r` (carriage return) characters corrupted the scripts.
The Fix
Instead of forcing every developer to manually run `dos2unix` tools on their local machines, I standardized the repository's cross-OS execution protocol by injecting and configuring a global `.gitattributes` file. This forced Git to strictly enforce `LF` line endings for all executable scripts regardless of the host OS.
Key Changes
- Identified the root cause of widespread Windows build script failures.
- Configured global repository `.gitattributes`.
- Eliminated all `CRLF/LF` cross-platform friction, significantly lowering the barrier to entry for future contributors.