Skip to content

Pin shell scripts to LF, bump to 2.3.1#47

Merged
namthor9 merged 1 commit into
mainfrom
maxr/crlf-fix
May 22, 2026
Merged

Pin shell scripts to LF, bump to 2.3.1#47
namthor9 merged 1 commit into
mainfrom
maxr/crlf-fix

Conversation

@namthor9
Copy link
Copy Markdown
Contributor

The 2.3.0 tarball shipped scripts/postinstall.sh with CRLF line endings because npm publish was run from a Windows WT with git's autocrlf converting on checkout. Consumer installs on Linux then fail with $'\r': command not found at the first line of the script.

Add .gitattributes that pins *.sh to LF regardless of platform autocrlf settings, so any future publish from any environment produces a consistent tarball. Bump to 2.3.1 to roll out the fix.

Note for whoever publishes 2.3.1: after pulling this branch, the existing WT files are not automatically re-checked-out, so on Windows you may need to force the .gitattributes rules to take effect on the current WT:

git rm --cached -- scripts/.sh
git checkout -- scripts/
.sh

Then verify with file scripts/postinstall.sh — it should not report "with CRLF line terminators" — before running npm publish.

The 2.3.0 tarball shipped scripts/postinstall.sh with CRLF line
endings because npm publish was run from a Windows WT with git's
autocrlf converting on checkout. Consumer installs on Linux then
fail with `$'\r': command not found` at the first line of the script.

Add .gitattributes that pins *.sh to LF regardless of platform
autocrlf settings, so any future publish from any environment
produces a consistent tarball. Bump to 2.3.1 to roll out the fix.

Note for whoever publishes 2.3.1: after pulling this branch, the
existing WT files are not automatically re-checked-out, so on
Windows you may need to force the .gitattributes rules to take
effect on the current WT:

  git rm --cached -- scripts/*.sh
  git checkout -- scripts/*.sh

Then verify with `file scripts/postinstall.sh` — it should not
report "with CRLF line terminators" — before running npm publish.
@namthor9 namthor9 merged commit c1cd4e7 into main May 22, 2026
4 checks passed
@namthor9 namthor9 deleted the maxr/crlf-fix branch May 22, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant