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

How do I run a script with one of the MSYS2 launchers? #272

Open
TheShermanTanker opened this issue Dec 23, 2022 · 1 comment
Open

How do I run a script with one of the MSYS2 launchers? #272

TheShermanTanker opened this issue Dec 23, 2022 · 1 comment
Labels
question Further information is requested

Comments

@TheShermanTanker
Copy link

I currently have a workflow that needs to use one of the launchers themselves (mingw64.exe and so on, bash by itself won't cut it since the workflow depends on the environment the launcher provides), but setting the path and doing shell: mingw64 . {0} (which seems to be how to run the launcher with the file specified) simply doesn't execute anything:

# Run Visual Studio Installer
  '/c/Program Files (x86)/Microsoft Visual Studio/Installer/vs_installer.exe' \
    modify --quiet --installPath 'C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise' \
    --add Microsoft.VisualStudio.Component.VC.1[4](https://github.com/TheShermanTanker/jdk/actions/runs/3732433000/jobs/6331878210#step:7:4).29.x8[6](https://github.com/TheShermanTanker/jdk/actions/runs/3732433000/jobs/6331878210#step:7:6).x64
  shell: D:\a\_temp/msys64\mingw64.EXE . {0}
  env:
    MSYS2_PATH_TYPE: minimal
    CHERE_INVOKING: 1
    MSYSTEM: MINGW64

(There should be way more log output than the absolute nothingness shown above!)

Is there a way to do this properly? I know the action provides a wrapper msys2.cmd script, but it seems to just directly call bash after setting the usual CHERE_INVOKING and so on, which doesn't seem to be what I need

@lazka
Copy link
Member

lazka commented Jan 15, 2023

Those are GUI launchers, they wont do what you want in CI.

Not sure what you are trying to do, or what you want, but you just pass "msystem" to the action, and then the "msys2" command will launch bash with the right environment.

@eine eine added the question Further information is requested label Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants