From 845a8f0203cdba75c88301e8be158c0bd95ccdb7 Mon Sep 17 00:00:00 2001 From: boonxiong2 <16048561@qq.com> Date: Mon, 5 Oct 2026 14:05:27 +0800 Subject: [PATCH] chore(git): pin *.sh to LF via .gitattributes Shell scripts are run by bash (WSL/Linux/CI). With core.autocrlf=true the working tree gets CRLF, and bash then fails on the stray CR: the packing step of build.bat died with pack_system_image.sh: line 13: $'\r': command not found pack_system_image.sh: line 14: set: pipefail\r: invalid option name core.autocrlf is a per-clone setting and is not shared, so the only reliable fix is a repository-level attribute. Pin *.sh to LF for every checkout. --- .gitattributes | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitattributes b/.gitattributes index 9942ba2..df7193a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,8 @@ *.mp4 filter=lfs diff=lfs merge=lfs -text + +# Shell scripts are executed by bash (WSL / Linux / CI). CRLF line endings +# break them outright ("$'\r': command not found", and a stray CR in a shebang +# or in `set -euo pipefail` makes the whole script unrunnable) - the packing +# step of this project's build died on exactly that. Pin LF for every checkout +# regardless of the developer's core.autocrlf setting. +*.sh text eol=lf