-
Notifications
You must be signed in to change notification settings - Fork 157
Set SHELL in tests that use shell/2 #3126
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
base: master
Are you sure you want to change the base?
Conversation
The `shell/2` predicate always runs its argument in the user's donfigured shell. This is not always POSIX compliant, because some people use stuff like fish and Nushell. This sets the $SHELL env var to /bin/sh, which is a POSIX compliant shell in any reasonable Unix.
|
Of course Windows would fail. (The mystery is why it even passed before) |
|
Oh no, I understand why now. The Windows runners have Git Bash installed, and all the GNU coreutils (like |
|
I have the Windows tests/build for Trealla use the msys2 shell, which seems to be reasonably POSIX-y: https://github.com/guregu/trealla/blob/c3216a11ae2c6c987201b2dfd02620d8c2d8d3dc/.github/workflows/build.yaml#L59 |
|
The problem here isn't getting a POSIX-y into the Windows runner, there's many ways to do that. The problem is that The I believe we should either:
2 sounds like a lot of work to maintain as most contributors here don't use Windows machines and are probably not familiar with cmd.exe or PowerShell peculiarities, so I'll be going with 1 for now. We could just always use |
|
I haven't checked how these tests are run, but one thing to keep in mind when using Edit: Though it appears all tests were already using Footnotes |
|
I'm aware of this issue. I thought it shouldn't be a problem because the Rust tests run in different processes, but turns out that's not true!!. As you mentioned though, this was already a problem there before. And these tests run sequentially so the problems should be reduced (not sure if completely avoided). I'll try to turn these tests into |
The
shell/2predicate always runs its argument in the user's configured shell. This is not always POSIX compliant, because some people use stuff like fish and Nushell. This sets the$SHELLenv var to/bin/sh, which is a POSIX compliant shell in any reasonable Unix.I wasn't being able to run the tests because of this (I use Nushell).