Skip to content

fix(skills): pin *.sh to LF so scripts run in WSL#30078

Merged
gambinish merged 1 commit into
mainfrom
fix/skills-sync-lf-line-endings
May 14, 2026
Merged

fix(skills): pin *.sh to LF so scripts run in WSL#30078
gambinish merged 1 commit into
mainfrom
fix/skills-sync-lf-line-endings

Conversation

@abretonc7s

@abretonc7s abretonc7s commented May 13, 2026

Copy link
Copy Markdown
Contributor

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) 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

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.

Reviewed by Cursor Bugbot for commit 788deae. Bugbot is set up for automated code reviews on this repo. Configure here.

Without an explicit eol attribute, Windows clones with core.autocrlf=true
rewrite shell scripts to CRLF and bash fails in WSL with `set: invalid option`
and `$'\\r': command not found`. Git Bash tolerated it; WSL did not.
Pinning *.sh to LF makes the checkout deterministic across platforms.
@github-actions

Copy link
Copy Markdown
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbotv2 metamaskbotv2 Bot added the team-perps Perps team label May 13, 2026
@abretonc7s abretonc7s enabled auto-merge May 13, 2026 07:10
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: None (no tests recommended)
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: low
  • AI Confidence: 99%
click to see 🤖 AI reasoning details

E2E Test Selection:
The only changed file is .gitattributes, which adds a single rule: *.sh text eol=lf to ensure shell scripts use LF line endings (for WSL/Windows compatibility). This is a pure Git configuration change that:

  1. Has zero impact on application code, UI, or business logic
  2. Does not affect any test infrastructure or E2E test flows
  3. Does not touch any controllers, Engine, or state management
  4. Has no effect on app performance
  5. Only affects how Git handles line endings in .sh files when checking out on Windows

No E2E tests or performance tests are warranted for this change.

Performance Test Selection:
The .gitattributes change only configures Git line ending behavior for shell scripts. There is no performance impact whatsoever.

View GitHub Actions results

@sonarqubecloud

Copy link
Copy Markdown

@abretonc7s abretonc7s added no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed no changelog required No changelog entry is required for this change labels May 14, 2026
@metamaskbotv2 metamaskbotv2 Bot added the INVALID-PR-TEMPLATE PR's body doesn't match template label May 14, 2026
@abretonc7s abretonc7s added this pull request to the merge queue May 14, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 14, 2026
@gambinish gambinish added this pull request to the merge queue May 14, 2026
Merged via the queue into main with commit 648cfb4 May 14, 2026
91 of 95 checks passed
@gambinish gambinish deleted the fix/skills-sync-lf-line-endings branch May 14, 2026 15:12
@github-actions github-actions Bot locked and limited conversation to collaborators May 14, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.78.0 Issue or pull request that will be included in release 7.78.0 label May 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

INVALID-PR-TEMPLATE PR's body doesn't match template no changelog required No changelog entry is required for this change no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed release-7.78.0 Issue or pull request that will be included in release 7.78.0 size-XS team-perps Perps team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants