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

setup-ruby interferes with Windows runner's own MSYS2 install #57

Closed
lopopolo opened this issue May 21, 2020 · 6 comments
Closed

setup-ruby interferes with Windows runner's own MSYS2 install #57

lopopolo opened this issue May 21, 2020 · 6 comments

Comments

@lopopolo
Copy link

setup-ruby/windows.js

Lines 121 to 124 in 002b15e

// Remove when Actions Windows image contains MSYS2 install
if (!fs.existsSync(msys2)) {
await symLinkToEmbeddedMSYS2()
}

actions/runner-images#905 (comment)

I believe it is time to remove this bit of setup. If it is not, how can I opt out of setup-ruby including a bundled MSYS2?

@MSP-Greg
Copy link
Collaborator

@lopopolo

See my response in actions/runner-images#905.

Re changes here, there are quite a few repos running Windows CI, and having MSYS2 in the path is essentially expected. An input could be added to allow it not to be so, but I think the better fix is to remove 7z from the MSYS2 install...

@eregon
Copy link
Member

eregon commented May 21, 2020

That specific case seems a bug of upstream:
actions/runner-images#905 (comment)
actions/runner-images#916

The linked code will actually do nothing now, right? Since C:\msys64 will exist (but it's likely not rolled out everywhere yet so we need the fallback).

I guess the only thing to do is we shouldn't prepend C:\msys64\mingw64\bin and C:\msys64\usr\bin to the PATH if C:\msys64 already exists, and if MSYS2 is already in the PATH.
That way the PATH is closer to what it looks like when the runner starts.
But from what I heard MSYS2 isn't added to PATH by default, so I guess no changes at all?

@eregon
Copy link
Member

eregon commented May 21, 2020

I tried to make sure my assumptions regarding PATH are correct in https://github.com/ruby/setup-ruby/runs/695926638?check_suite_focus=true
But that revealed C;\msys64 doesn't exist in that run and so is not yet fully deployed.

@eregon
Copy link
Member

eregon commented May 21, 2020

When there is no C:\msys64 in the image, the 7z from Chocolatey is used (both before and after this action):
https://github.com/ruby/setup-ruby/runs/695968983?check_suite_focus=true

@MSP-Greg
Copy link
Collaborator

I guess no changes at all?

Agreed.

@eregon eregon closed this as completed May 21, 2020
@MSP-Greg
Copy link
Collaborator

JFYI, the comment below is incorrect.

The code should be removed when Actions removes the embedded MSYS2 installs that currently exist in the four ToolCache Rubies.

When that happens (only after MSYS2 install is rolled out), there will be nothing to symlink to.

// Remove when Actions Windows image contains MSYS2 install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants