Consider working around Git on Windows' use of CRLF vs. bash scripts
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 13.6k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
When I try to run ./configure on the /john/src file in Cygwin on my Windows 10 device, I get the following error:
$ ./configure
./configure: line 16: $'\r': command not found
./configure: line 31: syntax error near unexpected token newline'
'/configure: line 31: ;;
When I looked at the /src file I found this disclaimer starting on line 17211:
On cygwin, bash can eat \r inside `` if the user requested igncr.
But we know of no other shell where ac_cr would be empty at this
point, so we can use a bashism as a fallback.
Is there a workaround I can use?
Contributor guide
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 reproducing the ./configure failure in Cygwin on Windows and inspect the generated /src file around line 17211, where the issue notes bash and carriage-return handling. Check how Git's CRLF checkout behavior affects the bash script; done means ./configure runs without the reported \r command and syntax errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bash, git
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100