The problem
The Playwright suite cannot be run from a Windows checkout. npx playwright test starts its web server with bash tests/e2e/serve.sh, and bash fails on
every line of that file.
$ file tests/e2e/serve.sh
tests/e2e/serve.sh: Bourne-Again shell script, ASCII text executable, with CRLF line terminators
Cause
The file is stored LF in the index, but there is no .gitattributes, so a
checkout with core.autocrlf=true (the Windows default, and what git config --global core.autocrlf true sets during Git for Windows setup) converts it to
CRLF on the way to disk. bash treats the trailing CR as part of each command.
$ git ls-files --eol tests/e2e/serve.sh
i/lf w/crlf attr/ tests/e2e/serve.sh
CI never sees this because it runs on Linux, where autocrlf is off.
Who it affects
Anyone developing StemDeck on Windows, which includes the primary desktop
target. The practical effect is that the browser tests get skipped locally and
only run after a push, or are assumed to pass.
Constraints
The fix has to survive a fresh clone rather than being repaired in one working
copy. Running dos2unix on the file fixes it until the next checkout.
Related, not the same problem
While confirming this, serve.sh did something worse on a GPU development box:
its uv run resynced the project environment, uninstalled seven packages, and
tried to replace a hand-installed torch 2.6.0+cu124 with the plain wheel. It
failed partway on a locked DLL and rolled back, so nothing was lost, but a
harness that can quietly rebuild a developer's CUDA environment is worth its own
issue and is not fixed by anything here.
The problem
The Playwright suite cannot be run from a Windows checkout.
npx playwright teststarts its web server withbash tests/e2e/serve.sh, and bash fails onevery line of that file.
Cause
The file is stored LF in the index, but there is no
.gitattributes, so acheckout with
core.autocrlf=true(the Windows default, and whatgit config --global core.autocrlf truesets during Git for Windows setup) converts it toCRLF on the way to disk. bash treats the trailing CR as part of each command.
CI never sees this because it runs on Linux, where autocrlf is off.
Who it affects
Anyone developing StemDeck on Windows, which includes the primary desktop
target. The practical effect is that the browser tests get skipped locally and
only run after a push, or are assumed to pass.
Constraints
The fix has to survive a fresh clone rather than being repaired in one working
copy. Running
dos2unixon the file fixes it until the next checkout.Related, not the same problem
While confirming this,
serve.shdid something worse on a GPU development box:its
uv runresynced the project environment, uninstalled seven packages, andtried to replace a hand-installed
torch 2.6.0+cu124with the plain wheel. Itfailed partway on a locked DLL and rolled back, so nothing was lost, but a
harness that can quietly rebuild a developer's CUDA environment is worth its own
issue and is not fixed by anything here.