Skip to content

Make cygwinMSYSCheck more robust (#186) #187

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

Merged
merged 1 commit into from
Nov 4, 2021
Merged

Make cygwinMSYSCheck more robust (#186) #187

merged 1 commit into from
Nov 4, 2021

Conversation

RyanGlScott
Copy link
Member

We cannot rely on "-master" being at the end of the filepath name in cygwinMSYSCheck on recent MinTTYs.

Description

To accommodate, this patch updates the implementation of cygwinMSYSCheck to match what git-for-windows does:

  • Always use isInfixOf to check if "cygwin-", "msys-", and "-pty" are in the filepath name.
  • Don't check "-master" at all, as this seems to assume a naming convention that could change in the future.

Motivation and Context

Fixes #186.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • I have updated the documentation accordingly.
  • I have not added a new Haskell dependency.
  • I have included a changelog entry.
  • I have not modified the version of the package in Win32.cabal.

We cannot rely on `"-master`" being at the end of the filepath name in
`cygwinMSYSCheck` on recent MinTTYs. To accommodate, this patch updates the
implementation of `cygwinMSYSCheck` to match what `git-for-windows` does:

* Always use `isInfixOf` to check if `"cygwin-"`, `"msys-"`, and "`-pty"` are
  in the filepath name.
* Don't check `"-master"` at all, as this seems to assume a naming convention
  that could change in the future.

Fixes #186.
@Mistuke
Copy link
Contributor

Mistuke commented Nov 3, 2021

Thanks! Ugh did someone move the 32-bit cabal..

@Mistuke
Copy link
Contributor

Mistuke commented Nov 3, 2021

Hmm looks like a CDN issue likely.

@Mistuke
Copy link
Contributor

Mistuke commented Nov 3, 2021

Thanks, looks good, I'll merge and release tomorrow when Im behind a computer.

@Mistuke Mistuke merged commit 8460ef8 into haskell:master Nov 4, 2021
RyanGlScott added a commit to RyanGlScott/mintty that referenced this pull request Nov 7, 2021
This backports haskell/win32#187, the fix for haskell/win32#186.

Fixes #2.
RyanGlScott added a commit to RyanGlScott/mintty that referenced this pull request Nov 7, 2021
This backports haskell/win32#187, the fix for haskell/win32#186.

Fixes #2.
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.

isMinTTY no longer detects recent minttys
2 participants