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

Windows - steps - custom shell #460

Closed
MSP-Greg opened this issue Apr 29, 2020 · 2 comments
Closed

Windows - steps - custom shell #460

MSP-Greg opened this issue Apr 29, 2020 · 2 comments
Labels
question Further information is requested

Comments

@MSP-Greg
Copy link

MSP-Greg commented Apr 29, 2020

Describe the bug

Attempted to use a custom shell on Windows. Using MSYS2, and wanted to use its bash/sh, rather than Git's. Path has been set to do so.

In https://github.com/actions/runner/blob/master/docs/adrs/0277-run-action-shell-options.md, it states:

'The first word of the formatted string is assumed to be a command, and we attempt to locate its full path'

It seems this is done without taking into account what Path has been defined in the workflow file.

I tried both bash and sh, the sh text was sh.exe -e {0}, and it always ran the shell from
C:\Program Files\Git\bin even though the Path had the correct MSYS2 folder before the Git folder(s).

EDIT: Changing the path searched would be a breaking change. So, if possible, allowing the first full 'word' to be a full path to the command and checking for its existence before searching Path would probably be better...

@MSP-Greg MSP-Greg added the bug Something isn't working label Apr 29, 2020
@TingluoHuang TingluoHuang added question Further information is requested runner and removed bug Something isn't working labels Jun 8, 2020
@TingluoHuang
Copy link
Member

What about to use ::add-path::{path} to change PATH dynamically in your workflow?

@MSP-Greg
Copy link
Author

MSP-Greg commented Jun 8, 2020

Closing, see similar issue (and response) at #497

@MSP-Greg MSP-Greg closed this as completed Jun 8, 2020
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

2 participants