Skip to content

Windows - steps - custom shell #460

@MSP-Greg

Description

@MSP-Greg

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...

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions