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

Combine with golang action #13

Closed
roelandm opened this issue Nov 26, 2019 · 4 comments · Fixed by #14
Closed

Combine with golang action #13

roelandm opened this issue Nov 26, 2019 · 4 comments · Fixed by #14

Comments

@roelandm
Copy link

How can I combine this action with golang?
The command go env works, but msys2do go env doesn't.

name: msys2 build

on: [push]

jobs:
  build:
    runs-on: windows-latest

    steps:
      - uses: actions/setup-go@v1
      - uses: numworks/setup-msys2@v1

      - uses: actions/checkout@v1

      - run: go env
      - run: msys2do go env

D:\a\project\project>d:\a\_temp\msys\\msys64\usr\bin\bash.exe -ilc "cd $OLDPWD && go env" 
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
bash: go: command not found
##[error]Process completed with exit code 1.
@eine
Copy link
Contributor

eine commented Nov 27, 2019

This is the expected behaviour, because MSYS2_PATH_TYPE is set to strict: https://github.com/numworks/setup-msys2/blob/master/index.js#L38. If set to inherit, it works. You can test it by forking this repo, changing that line and running the following workflow:

name: go
on: [push]
jobs:
  build:
    runs-on: windows-latest
    steps:
      - uses: actions/setup-go@v1
      - uses: actions/checkout@v1
      - run: yarn
      - uses: ./
      - run: msys2do go env

@roelandm
Copy link
Author

Thank you, that works perfect. Should this be an option in the action?

@eine
Copy link
Contributor

eine commented Nov 27, 2019

@roelandm
Copy link
Author

Thanks!!

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 a pull request may close this issue.

2 participants