termux-fix-shebang : fails when incompatible cr/lf
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 4.3k
- Forks
- 920
- PR merge metrics
- No merged PRs in 30d
Description
happened to share a script by email (k9mail) and the attachment was mangled to contain "\r" at line ends.
termux-fix-shebang fixed the path but not the "\r", resulting in a rather "mysterious" error message.
dos2unix fixed it.
Btw.. isn't there some way to workaround to avoid needing to fix shebang paths at least for the primary shell?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the termux-fix-shebang entry point and reproducing the reported behavior with a script whose lines end in CR/LF. Compare the result with dos2unix and determine how the shebang path is handled; done means the incompatible carriage returns no longer produce the reported error while the existing shebang behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100