Hello
How can I use PowerShell on my self hosted runners on macOS ? I already have all my CI written in PowerShell because there was no way to use bash on Windows.
Apparently I can pass a runtime to the runner.jar, but when I pass windows-powershell on mac, it doesn't find git in the path. Although I added it to my powershell profile.
[2022-10-12 15:43:24,146] Runner version: 1.369
[2022-10-12 15:43:24,161] Runner runtime: windows-powershell
Exception in thread "main" com.atlassian.pipelines.runner.core.exception.PrerequisiteFailedRunnerException: git executable not found in PATH.
[2022-10-12 15:43:25,035] Updating runner state to "OFFLINE".
[2022-10-12 15:43:26,185] Shutdown completed
I can't find any documentation on this, but I hope Atlassian is not expecting their user to write and maintain their CI scripts in both PS and SH scripts surely ?
Hi @Romain T_ and welcome to the community!
MacOS runners can use only bash at the moment. PowerShell has not been tested nor is it supported.
However, you can run a PowerShell script in bash using
pwsh myscript.ps1
where myscript.ps1 is the name of your PowerShell script.
Kind regards,
Theodora
That's good to hear and you are very welcome!
Feel free to reach out if you ever need anything else!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.