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

[Windows] Removed Git internal tools from PATH #1648

Merged
merged 20 commits into from
Oct 28, 2020
Merged

Conversation

al-cheb
Copy link
Contributor

@al-cheb al-cheb commented Sep 22, 2020

Description

Topic discussion: #1525

Related issue:

#1525

Check list

  • Related issue / work item is attached
  • Tests are written (if applicable)
  • Documentation is updated (if applicable)
  • Changes are tested and related VM images are successfully generated

@al-cheb al-cheb requested a review from a team September 22, 2020 13:22
Copy link

@eine eine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @al-cheb! I'm really grateful for seeing this moving forward. Please, see comments below, specially regarding the manipulation of the PATH.

@MSP-Greg
Copy link
Contributor

OpenSSL just released 1.1.1h, and I was reminded of an issue. From a related issue discussion:

Unix tools that are resolved from System32 folder right now, will continue to work as expected since system32 is located before in PATH)

The popular MSVC OpenSSL build places OpenSSL dll's in System32. I can't test it right now, but this may cause conflicts with MSYS2/MinGW tools loading those files? I know in the past that I've renamed them in various Actions/AppVeyor scripts. If users reshuffle Path, it isn't an issue.

And, I don't recall if it was a matter of MSYS2 OpenSSL failing install and then 'CI' resolving the dll's to the System32 files. That isn't your problem, but can produce very confusing results.

@al-cheb
Copy link
Contributor Author

al-cheb commented Oct 5, 2020

@MSP-Greg , @eine, Hello.

Could you please review the first part of PR to remove git internal tools from PATH?

Changes:

  • Remove git internal tools from PATH "/o:PathOption=Cmd"
  • Add symlinks to shells

Shells

Name Target
bash.exe (Default) C:\msys64\usr\bin\bash.exe
gitbash.exe C:\Program Files\Git\bin\bash.exe
msysbash.exe C:\msys64\usr\bin\bash.exe
sh.exe C:\msys64\usr\bin\sh.exe
winbash.exe C:\windows\System32\bash.exe
  • Use sfx.exe to install msys2
  • Replace git internal tools to msys2 and add small notes
Notes:
Location: C:\msys64

1. MSYS2 is pre-installed on image
2. C:\msys64\mingw64\bin is added to PATH and has lower precedence than C:\Windows\System32
3. C:\msys64\usr\bin is added to PATH and has lower precedence than C:\Windows\System32
4. Default bash.exe shell is set to the C:\msys64\usr\bin\bash.exe
  • Add bash.exe to PATH -> C:\msys64\usr\bin\bash.exe

@eine
Copy link

eine commented Oct 5, 2020

@al-cheb, as commented in #1648 (comment), I believe there should be a stronger warning about relying on msys64 being added to the PATH by default. The proposed notes are informative only. Apart from that, LGTM.

Copy link
Contributor

@MSP-Greg MSP-Greg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

6 participants