Comments (11)
This was already reported here actions/runner#353
I think that's a similar but unrelated issue. It is about getting a different behaviour when not setting
shell
or when setting it tobash
. In our case, we don't use any of them, neither the default nor bash. Our entrypoint ismsys2.cmd
.
Yeah, unrelated, I just wanted to suggest at first that we should mirror what bash does in GHA ideally, but turned out that it wasn't that clear...
from setup-msys2.
yes!
from setup-msys2.
(It's documented as
set -e o pipefail
here https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference but it doesn't look like that's true)
This was already reported here actions/runner#353
from setup-msys2.
I'm not sure I understand the context... Your concern is legit, and I agree. But, please, let me elaborate:
- Commands executed through this Action's
msys2 {0}
are called withbash --norc -ilceo pipefail
(see https://github.com/msys2/setup-msys2/blob/master/main.js#L74). Hence, regardless of the default setup of the shells provided by GitHub, the behaviour of the Action should be as expected. - If users
set -e
in their scripts, the behaviour is the expected.
I wrote multiple tests in a fork of your demo (https://github.com/eine/msys2-workflow-error-test/blob/master/.github/workflows/main.yml), but I reached no conclusive solution:
shell: bash
is converted toshell: C:\Program Files\Git\bin\bash.EXE --noprofile --norc -e -o pipefail {0}
and it works as expected.- However, writing it manually does not work: https://github.com/eine/msys2-workflow-error-test/runs/866200010?check_suite_focus=true#step:3:4
bash --norc -ilceo pipefail {0}
fails because of the slashes: https://github.com/eine/msys2-workflow-error-test/runs/866200222?check_suite_focus=true#step:3:7
Might this issue be related to this warning https://github.com/eine/msys2-workflow-error-test/runs/866200165?check_suite_focus=true#step:4:9 ?
from setup-msys2.
This was already reported here actions/runner#353
I think that's a similar but unrelated issue. It is about getting a different behaviour when not setting shell
or when setting it to bash
. In our case, we don't use any of them, neither the default nor bash. Our entrypoint is msys2.cmd
.
from setup-msys2.
- Commands executed through this Action's
msys2 {0}
are called withbash --norc -ilceo pipefail
(see https://github.com/msys2/setup-msys2/blob/master/main.js#L74). Hence, regardless of the default setup of the shells provided by GitHub, the behaviour of the Action should be as expected.
Doesn't it pass a file there? That would mean a new shell.
I'll try some things...
from setup-msys2.
My understanding is that run: anything
is passed raw. That's why run: anything && anyotherthing
and such might fail. However, the content of run: |
is saved to some temporal location and passed as a file. See numworks/setup-msys2#22.
Might be worth trying run: fail; echo "ok";
?
from setup-msys2.
Doesn't it pass a file there? That would mean a new shell.
Oh, I see what you mean. If run: |
, https://github.com/msys2/setup-msys2/blob/master/main.js#L74 might need to be:
drive + `\\msys64\\usr\\bin\\env.exe /usr/bin/bash --norc -ilceo pipefail "cd $OLDPWD && bash -e %args%"`
or something similar.
from setup-msys2.
I think I have something, I'll create a PR later
from setup-msys2.
oh, meh, it gets used to run scripts and binary files (like to "go env" example). No idea how to fix that without breaking things.
from setup-msys2.
@laxka, I guess this is fixed, now that #44 is merged, isn't it?
from setup-msys2.
Related Issues (20)
- 'location' not honored? HOT 6
- Extend action to support Ubuntu runner? HOT 7
- Feature: option for disable caching HOT 5
- "powershell.exe" renamed to "pwsh.exe" HOT 2
- Failed install? HOT 2
- ERROR in dll HOT 8
- Tag releases with semver tag HOT 5
- ctest fails as test-binaries are missing, even though cmake-build of those binaries shows no error HOT 1
- update to node20 HOT 2
- Cache package databases HOT 1
- Get "verified" badge for msys2/setup-msys2 on github marketplace HOT 4
- sometimes action is very slow HOT 11
- Provide alternative for $GITHUB_PATH inside MSYS2 with path-type: minimal HOT 8
- [question] how to move needed binaries (DLL's) to release zip? [SOLVED] HOT 13
- New installer hangs on clangarm64 HOT 12
- Winget Update problem HOT 8
- issue with "location" HOT 2
- Cache restore problem (gzip: Cannot exec) HOT 1
- Add cache-from and cache-to options
- Add possibility to modify BUILDENV in /etc/makepkg.conf using workflow arguments
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from setup-msys2.