-
How do I install bash on my Windows local runner? Since my costs are getting to high, I’m trying to move to local runners. But my script immediately fails because there is no bash on windows. What version of bash should I install and where do I get it? I don’t see bash listed on the “Software installed on GitHub-hosted runners” document. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
I tried install Linux subsystem for Windows to get bash, it gets me bash, but it fails right away:
|
Beta Was this translation helpful? Give feedback.
-
WSL bash will not work because it runs relative to the WSL filesystem, and the temporary script that is created exists on the host’s (Windows) filesystem Actually, the bash on Windows for GitHub hosted machines is provided via Git Bash (packaged with Git for Windows), but more specifically this version of bash I believe comes from MSYS which you could install on your Windows machines to get bash (and other GNU utilities) Alternatively you can use a shell other than bash, such as cmd or powershell, which will be installed by default on your Windows machines, see the docs on that here: Hope that helps! |
Beta Was this translation helpful? Give feedback.
-
I needto add C:\Program Files\Git\bin to my path and then it worked. |
Beta Was this translation helpful? Give feedback.
WSL bash will not work because it runs relative to the WSL filesystem, and the temporary script that is created exists on the host’s (Windows) filesystem
Actually, the bash on Windows for GitHub hosted machines is provided via Git Bash (packaged with Git for Windows), but more specifically this version of bash I believe comes from MSYS which you could install on your Windows machines to get bash (and other GNU utilities)
Alternatively you can use a shell other than bash, such as cmd or powershell, which will be installed by default on your Windows machines, see the docs on that here:
https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github…