Commit 648cfb4
authored
fix(skills): pin *.sh to LF so scripts run in WSL (#30078)
## Summary
- Pin `*.sh` to `eol=lf` in `.gitattributes`.
- Without it, Windows clones with `core.autocrlf=true` rewrite
`scripts/skills-sync.sh` to CRLF, and `bash` fails in WSL with `set:
invalid option` and `$'\r': command not found`. Git Bash tolerated it;
WSL did not.
- Companion fix to the extension PR
([MetaMask/metamask-extension#42488](MetaMask/metamask-extension#42488))
and the upstream `.gitattributes` in Consensys/skills.
## Test plan
- [ ] `git check-attr -a scripts/skills-sync.sh` reports `eol: lf`
- [ ] Fresh clone on Windows/WSL keeps LF; `yarn skills` runs without
`\r` errors
- [ ] macOS/Linux: no diff after pull
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Low Risk**
> Low risk change limited to git line-ending attributes; it only affects
how `*.sh` files are checked out on Windows/WSL and should not impact
runtime logic.
>
> **Overview**
> Ensures `*.sh` files are always checked out with **LF** by adding
`*.sh text eol=lf` to `.gitattributes`, preventing Windows `autocrlf`
clones from rewriting scripts to CRLF and breaking execution in WSL.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
788deae. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent a9c779f commit 648cfb4
1 file changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
0 commit comments