Description
All shell scripts in the bin/ directory are saved with Windows CRLF line endings (\r\n), which causes execution failures on Linux systems. This affects all users trying to use the jacinle command-line tools.
Error Symptoms
When running any jacinle command (e.g., jac-run, jac-crun), users encounter errors like:
/bin/bash: $'\r': command not found
_jac-init.sh: No such file or directory (due to path corruption)
syntax error: unexpected end of file
Root Cause
The shell scripts contain Windows-style line endings (CRLF) instead of Unix-style (LF), causing bash to interpret the carriage return character (\r) as part of commands.
Temporary Workaround
Users must manually convert all scripts:
find /path/to/jacinle/bin -name "*.sh" -o -name "jac-*" | xargs dos2unix
Proposed Solution
- Convert all shell scripts to use Unix line endings (LF) in the repository
- Add
.gitattributes file to enforce proper line ending handling:
*.sh text eol=lf
jac-* text eol=lf
- Consider adding a CI check to prevent CRLF line endings in shell scripts
Impact
This issue affects every Linux user and significantly impacts the user experience, as the tools fail immediately upon installation without any clear error message indicating the root cause.
Environment
- OS: Linux (Ubuntu, CentOS, etc.)
- jacinle version: [current version]
- Installation method: git clone
Description
All shell scripts in the
bin/directory are saved with Windows CRLF line endings (\r\n), which causes execution failures on Linux systems. This affects all users trying to use the jacinle command-line tools.Error Symptoms
When running any jacinle command (e.g.,
jac-run,jac-crun), users encounter errors like:/bin/bash: $'\r': command not found_jac-init.sh: No such file or directory(due to path corruption)syntax error: unexpected end of fileRoot Cause
The shell scripts contain Windows-style line endings (CRLF) instead of Unix-style (LF), causing bash to interpret the carriage return character (
\r) as part of commands.Temporary Workaround
Users must manually convert all scripts:
Proposed Solution
.gitattributesfile to enforce proper line ending handling:Impact
This issue affects every Linux user and significantly impacts the user experience, as the tools fail immediately upon installation without any clear error message indicating the root cause.
Environment