From f66511ccf8c70a8a9e50016a4e74031ae310182d Mon Sep 17 00:00:00 2001 From: caoqianming Date: Tue, 26 May 2026 10:45:17 +0800 Subject: [PATCH] Add .gitattributes: force LF for shell + Dockerfile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 防 Windows 本地 CRLF 检出 → 直接 docker build 时 init.sh shebang 报 `/bin/bash^M: No such file`。当前 deploy/sandbox/ 文件在 repo 已是 LF (git show 验过),本文件锁住未来贡献者环境。 Co-Authored-By: Claude Opus 4.7 (1M context) --- .gitattributes | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..a1abf55 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,6 @@ +# Force LF for files consumed by Linux toolchains (docker build / bash). +# Windows dev checkouts otherwise get CRLF via core.autocrlf, breaking +# `#!/bin/bash` and Dockerfile heredocs in container. +*.sh text eol=lf +Dockerfile text eol=lf +*.Dockerfile text eol=lf