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

is there any way to run tmate using the standard MSYS2 environment set by msys2/setup-msys2@v2? #86

Open
hradec opened this issue May 30, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@hradec
Copy link

hradec commented May 30, 2021

I running into a difficult situation where my action runs on windows using msys2/setup-msys2@v2, but tmate runs it's own mingw enviroment.

I'm using msys2/setup-msys2@v2 pip to install pywin32, but it's failing during the build. In tmate, when I run pip install pywin32, it finds it and installs correctly.

Is there any way to run tmate using msys2/setup-msys2@v2 environment instead?

@mxschmitt mxschmitt added the enhancement New feature or request label Oct 5, 2021
@dscho
Copy link
Collaborator

dscho commented Feb 13, 2022

Is there any way to run tmate using msys2/setup-msys2@v2 environment instead?

Not currently.

You could of course introduce support for a new input, say, msys2-root-directory, which would then be handled at the beginning of the run() function, for example like this:

if (process.platform === "win32") {
  process.env.MSYS2_ROOT = core.getInput("msys2-root-directory") || "C:\\msys64"
}

Then, in the call to the MSYS2 Bash, you would use that environment variable, something like this:

      spawn(`${process.env.MSYS2_ROOT}\\usr\\bin\\bash.exe", ["-lc", cmd], [...]

@hradec do you feel up to the task?

@alonbl
Copy link

alonbl commented Apr 1, 2022

What about the WSL? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants