superpowers plugin scripts checked out with CRLF line endings, break on WSL/Linux

Status Closed — not planned
Maintainer reply None cached
Activity 0 comments · opened Jul 27, 2026 · closed Jul 27, 2026

Description

Scripts bundled in the superpowers plugin (cache path ~/.claude/plugins/cache/claude-plugins-official/superpowers/<version>/skills/**/scripts/*) are checked out with CRLF line endings when the user's global git config has core.autocrlf=true and the plugin's source repo has no .gitattributes forcing eol=lf. This breaks any script using set -euo pipefail, since bash parses the trailing \r as part of the option name.

Repro

Environment: WSL2 (Ubuntu), global git config --global core.autocrlf true (common Windows-history default carried into WSL).

$ bash /home/kvasp/.claude/plugins/cache/claude-plugins-official/superpowers/6.2.0/skills/subagent-driven-development/scripts/sdd-workspace docs/superpowers/plans/2026-07-27-upwork-job-tracker.md
.../scripts/sdd-workspace: line 21: set: pipefail
: invalid option name

Confirmed with file:

$ file .../scripts/sdd-workspace
...: Bourne-Again shell script, Unicode text, UTF-8 text executable, with CRLF line terminators

18 executable/.sh files under the plugin cache checkout came back CRLF in this instance.

Root cause

  • core.autocrlf=true tells git to convert LF -> CRLF on checkout (intended for native Windows checkouts of text files).
  • The plugin source repo ships no .gitattributes (e.g. * text=auto eol=lf) to force LF for its own scripts, so it inherits the user's global autocrlf setting on checkout/clone into the plugin cache.
  • Any Linux/WSL user with core.autocrlf=true globally set (not unusual — carried over from Windows git installs, or set for cross-platform repos) gets silently broken shell scripts with no error until execution.

Suggested fix

Add a .gitattributes to the plugin/marketplace repo(s) that ship shell scripts, forcing eol=lf (or at minimum * text=auto eol=lf) regardless of the consumer's global autocrlf setting — same approach already used in other repos to avoid this exact class of bug. This would make plugin script checkouts deterministic across platforms independent of user git config.

Workaround

git config --global core.autocrlf input   # or false, on Linux/WSL
# then re-normalize existing checkout, e.g.:
cd ~/.claude/plugins/cache/claude-plugins-official
git rm --cached -r . && git reset --hard

View original on GitHub ↗