From 7355a40efe1195685073dca69a825bf6e8ee3ffa Mon Sep 17 00:00:00 2001 From: Carreira Cloud Date: Tue, 1 Sep 2026 16:28:22 -0300 Subject: [PATCH] Add .gitattributes to force LF line endings for shell scripts Windows clones with core.autocrlf=true check out *.sh with CRLF, which makes bash fail with errors like: \$'\r': command not found and syntax error near unexpected token \$'do\r'' when running the lab setup scripts (e.g. labs/starter-lab/scripts/setup.sh). Pin *.sh, *.bash, *.yml, *.yaml and Dockerfile to eol=lf, and keep Windows-native scripts (*.ps1, *.cmd, *.bat) as CRLF. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1b9c7a12-44cf-4dba-b696-b1106e69d4fe --- .gitattributes | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..7052593a7 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,13 @@ +# Keep shell scripts LF so they run under bash/WSL/Linux even on Windows checkouts +*.sh text eol=lf +*.bash text eol=lf + +# Other text formats commonly consumed by Linux tooling +Dockerfile text eol=lf +*.yml text eol=lf +*.yaml text eol=lf + +# Windows-native scripts stay CRLF +*.ps1 text eol=crlf +*.cmd text eol=crlf +*.bat text eol=crlf