Files
qingjian/.gitattributes
T
bfxh 141c231b44 ci: 加 shellcheck 门禁,并给 shell 脚本钉死 LF (#737)
CI 此前只对 4 个 Linux 脚本做 bash -n;shellcheck 只报 warning 及以上。.gitattributes 让 *.sh 始终以 LF 检出,避免 CRLF 让 shebang 失效。
2026-10-21 09:29:48 +08:00

10 lines
498 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Shell 脚本必须以 LF 存储、以 LF 检出。
#
# 没有这条规则时,Windows 上 core.autocrlf=true 会把工作区脚本转成 CRLF,
# 一旦 CRLF 被提交进去,Linux/macOS 上 shebang 就变成 "#!/bin/bash\r",
# 内核报 "bad interpreter: /bin/bash^M: No such file or directory",
# 整个脚本直接跑不起来(发版脚本出这种事就是发不了版)。
#
# 顺带也保证 CI 里 shellcheck 不会因为回车符刷出成百上千条 SC1017。
*.sh text eol=lf