Skip to content

Conversation

@tobsec
Copy link

@tobsec tobsec commented Jan 3, 2026

Enforce LF line endings for shell scripts via .gitattributes to prevent $'\r': command not found errors on Windows Subsystem for Linux (WSL).

Fixes issues when having Windows system and core.autocrlf=true in git config by explicitly setting *.sh text eol=lf in .gitattributes.

Changes:

  • Add .gitattributes with *.sh text eol=lf

Related PR: FOME-Tech/fome-fw#711

Tested on WSL with Debian.

@mck1117
Copy link
Contributor

mck1117 commented Jan 23, 2026

ensures all shell scripts are checked out with Unix (LF) line endings even when core.autocrlf=true on Windows.

wait, are you building in WSL from a clone done on the windows filesystem, rather than in wsl? is your working dir something like /mnt/c/Users/<user>/source/fome, rather than ~/source/fome?

@tobsec
Copy link
Author

tobsec commented Jan 24, 2026

yep, i cloned using git bash on windows. thats my normal everyday workflow using git bash and VS Code on windows thats why i also done like that here. with the small adaptions to the gitattributes, everything runs well for me with that approach, but should also not be a drawback if cloned in wsl or for linux users.

in the past, when i compiled RE, i setup everything windows native (no WSL) and it also worked. i was only working with a 2023 baseline, not sure if it works with more recent versions though.
(this 2023 RE version is still the base running in my boat setup, with my own changes on top for for adding NMEA2000 support. if there would interest in FOME adapting the NMEA2000 feature, i would be happy to share everything i already have and could support integrating it. find some links for the changes done:
rusefi/rusefi@master...tobsec:rusefi:NMEA2000
rusefi/libfirmware@master...tobsec:libfirmware:NMEA2000
thomasonw/NMEA2000_mbed@master...tobsec:NMEA2000_rusefi:rusefi
ttlappalainen/NMEA2000@master...tobsec:NMEA2000:rusefi
note that its only implemented quick and dirty and e.g. GROUP_FUNCTION_SUPPORT is disabled because of unresolved memory issues. but if there would be interest, let me know. i could create gh issue to discuss further on it.)

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.

2 participants