core.autocrlf 在不同机器上会把 .command/.sh 转成 CRLF,导致 Mac 用户 双击 .command 报 bad interpreter。明确锁定: - .bat/.cmd/.ps1 → CRLF(Windows 批处理需要) - .command/.sh/.mjs/.js/.json → LF(Mac/Linux 需要) 附带把 install/README.md、Windows-Menu.bat 的换行一次性规范化(纯换行, 无内容改动)。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
22 lines
593 B
Plaintext
22 lines
593 B
Plaintext
# 锁定换行符,保证跨平台分发的脚本可用:
|
||
# - Windows 批处理 .bat/.cmd 必须 CRLF,否则部分 Windows 环境解析异常
|
||
# - Mac/Linux 的 .command/.sh 必须 LF,否则双击/执行会报 bad interpreter
|
||
# - .mjs/.js 统一 LF
|
||
# 防止 core.autocrlf 在不同机器上把换行改乱。
|
||
|
||
*.bat text eol=crlf
|
||
*.cmd text eol=crlf
|
||
*.ps1 text eol=crlf
|
||
|
||
*.command text eol=lf
|
||
*.sh text eol=lf
|
||
*.mjs text eol=lf
|
||
*.js text eol=lf
|
||
*.json text eol=lf
|
||
|
||
# 二进制:不做换行转换
|
||
*.png binary
|
||
*.jpg binary
|
||
*.zip binary
|
||
*.ico binary
|