Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git Bash: prioritize cygwin binaries in PATH #2030

Closed
mcandre opened this issue Jan 17, 2019 · 5 comments
Closed

Git Bash: prioritize cygwin binaries in PATH #2030

mcandre opened this issue Jan 17, 2019 · 5 comments

Comments

@mcandre
Copy link

mcandre commented Jan 17, 2019

Git Bash should always order the cygwin binaries earlier than Windows binaries, as far as bash scripts see the PATH, so that common script utilities like find and mkdir don’t expand to the wrong binaries and break syntax. Out of the box, bash.exe is limited to running generic shell code and only binaries that do not conflict with Windows binaries.

Outside of bash script contexts, it is still good to allow users to choose whether and what order Git Bash ends up on PATH. But within a bash.exe context, we should probably do the right thing so that 90% of bash scripts can continue running UNIX-like external apps.

@dscho
Copy link
Member

dscho commented Jan 18, 2019

Thank you for your report. However, there are unfortunately serious problems with it.

First of all: this is an incomplete bug report. It not only lacks the information which Git for Windows version you use, it also lacks an MCVE.

Second: we do not ship with Cygwin. Never have, never will.

Do you mean MSYS2? If so, the MSYS2 binaries' directory is prepended to the PATH by Git Bash. Meaning: it already does what you claim it doesn't.

@PhilipOakley
Copy link

Supplemental to dscho's note:

Do you mean that you do have Cygwin installed, and that the Git for Windows fails to notice, and your installation's path becomes out of sync with what you need?

If so, you could add something to the install script that detects the situation and warns Cygwin users of what they may needs to check and do. But as dscho noted, it's not something that Git for Windows can fix directly.

PRs and clarifications welcome

@rimrul
Copy link
Member

rimrul commented Jan 19, 2019

Since @mcandre mentions bash.exe and seems to use it interchangeably with Git Bash I think he's calling /bin/bash.exe without using the git-bash.exe wrapper.

@dscho
Copy link
Member

dscho commented Jan 29, 2019

Well, @mcandre what is it? There are a lot of questions awaiting answers by you.

@dscho
Copy link
Member

dscho commented Feb 27, 2019

Tired of waiting.

@dscho dscho closed this as completed Feb 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants