Replies: 1 comment
|
Worth flagging one thing for after the .gitattributes fix lands: git add --renormalize .
git commit -m "Normalize line endings to LF"For people who already cloned and just want it working now, setting git config core.autocrlf input
git checkout-index --force --allYou could also have the installer self-heal at runtime (an early |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Problem
When
project-install.sh(and likely other.shscripts) are checked out on a Windows host and executed inside WSL2, they carry Windows-style CRLF (\r\n) line endings. Bash on Linux treats the\ras a literal character, causing virtually every line to fail:Variable values are also silently corrupted - e.g.
VERBOSE='false\r',DEBUG='false\r'- which can break conditional logic downstream even if the script appears to run.Root Cause
Git defaults
core.autocrlf=trueon Windows, converting LF to CRLF on checkout. Without a.gitattributesfile enforcingeol=lffor shell scripts, any Windows user gets CRLF endings.Impact
agent-os targets cross-platform use and WSL2 is the primary way Windows users run Linux tooling. This is a first-run blocker for a significant portion of the target audience.
Steps to Reproduce
core.autocrlf=true)../scripts/project-install.sh --profile php-symfony --verbose --debug.$'\r': command not foundon nearly every line.Suggested Fix
Add a
.gitattributesfile at the repo root to enforce LF for all shell scripts:Users who have already cloned can fix locally with:
All reactions