You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Custom shell wrapper doesn't work with powershell #78
I think something like this could work: shell: pixi run -e test pwsh -File {0}
It doesn't seem to work.
It is odd, because GitHub Actions Docs does seem to indicate that is possible. Maybe they do something special if they detect the first argument is "pwsh" or "powershell".
Powershell can't run scripts without the right extension. So GitHub Actions does something special when they detect the first command is "pwsh". This seem to work for me though:
shell: pwsh -command "pixi run -e test pwsh '{0}'"
Powershell can't run scripts without the right extension. So GitHub Actions does something special when they detect the first command is "pwsh". This seem to work for me though:
shell: pwsh -command "pixi run -e test pwsh '{0}'"
But now as nice to look at :(
Was this a reaction to my latest comment or did we comment at the same time?
Activity
ruben-arts commentedon Feb 15, 2024
The pixi run command sends all info after the initial command to the task.
I think something like this could work:
Note the
run pwsh -e test->run -e test pwshpavelzw commentedon Feb 15, 2024
This should be updated in the readme (and we should add a test for it as well)
pavelzw commentedon Feb 15, 2024
maybe also add a test for cmd.exe
melund commentedon Feb 17, 2024
@ruben-arts
It doesn't seem to work.
It is odd, because GitHub Actions Docs does seem to indicate that is possible. Maybe they do something special if they detect the first argument is "pwsh" or "powershell".
ruben-arts commentedon Feb 17, 2024
Yeah I experienced the same, that's why we added this to the documentation and tests in #79
You can use the environment with:
melund commentedon Feb 17, 2024
Powershell can't run scripts without the right extension. So GitHub Actions does something special when they detect the first command is "pwsh". This seem to work for me though:
But now as nice to look at :(
melund commentedon Feb 17, 2024
Ahh. Ok. I hadn't tried your way
I will give that a try.
ruben-arts commentedon Feb 17, 2024
Was this a reaction to my latest comment or did we comment at the same time?
melund commentedon Feb 17, 2024
They cross path I think :)
melund commentedon Feb 19, 2024
@ruben-arts, I am not sure your suggestion (
pixi run -e test pwsh -Command {0}) works.It doesn't produce any errors, but it doesn't run my code either. Or maybe it only runs the first line of run section. I have not tested that.
If I use my workaround:
Then the code actually runs.
See these screenshots from my pipeline:
With your suggestion nothing runs:
With:
pwsh -command "pixi run -e test pwsh '{0}'"it runs:melund commentedon Feb 21, 2024
@pavelzw did you guys see my last post? Easy to overlook in closed issue 😅 I dont mind creating a new issue if you think it is needed.
pavelzw commentedon Feb 21, 2024
Yeah, I didn't try to reproduce this yet... Is the issue maybe that it's multiple files?
Does this work for your use case?
setup-pixi/.github/workflows/test.yml
Lines 336 to 338 in 20681db
pavelzw commentedon Sep 28, 2024
@melund did you get around to try this?
melund commentedon Sep 29, 2024
@pavelzw: Yes that doesn't work:
https://github.com/melund/test-pixi/actions/runs/11090308043/job/30812485079#step:5:5
Only:
shell: pwsh -command "pixi run -e test pwsh '{0}'"seems to work