-
Notifications
You must be signed in to change notification settings - Fork 40
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
Allow using msys2 instead of cygwin #857
base: master
Are you sure you want to change the base?
Conversation
83f24cd
to
96de1ac
Compare
e7a744c
to
1dd04e9
Compare
Copilot
AI
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 7 out of 9 changed files in this pull request and generated 1 comment.
Files not reviewed (2)
- .github/workflows/workflow.yml: Evaluated as low risk
- action.yml: Evaluated as low risk
Comments suppressed due to low confidence (2)
packages/setup-ocaml/src/constants.ts:101
- The error message 'unrecognized value for windows-environment' could be more descriptive. Consider specifying the acceptable values, e.g., 'Unrecognized value for windows-environment. Accepted values are "cygwin" or "msys2".'
core.error("unrecognized value for windows-environment");
packages/setup-ocaml/src/constants.ts:89
- Ensure that the new behavior introduced by the 'WINDOWS_ENVIRONMENT' constant is covered by tests.
export const WINDOWS_ENVIRONMENT: "cygwin" | "msys2" = (() => {
} catch { | ||
// finally check the default msys directory | ||
const defaultRoot = "C:\\msys64"; | ||
testMsys2Installation(defaultRoot); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function testMsys2Installation
should be awaited to handle the promise correctly. Change it to await testMsys2Installation(defaultRoot);
.
testMsys2Installation(defaultRoot); | |
await testMsys2Installation(defaultRoot); |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
This patch provides support for using msys2 instead of cygwin as the environment for windows. It can be enabled with:
Otherwise, it still defaults to cygwin.
It will use the msys2 installation specified as follows:
MSYS2_ROOT
environment variablePATH
, it will use the installation that the pacman binary belongs to.C:\msys64
(available in the windows image for github actions: https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md#msys2).It does not cache the msys2 install, but it should be possible for setup-msys2 to handle that: https://github.com/msys2/setup-msys2.
This closes #846.