-
Notifications
You must be signed in to change notification settings - Fork 332
Open
Description
I've been reading through the docs, and trying to set the agent shell option, hoping it would also run the agent global hooks.
What I'm trying is to use PowerShell v7. I've tried
- using the cli argument
--shell - adding
shell=...to the agent config file - setting the environment variable
BUILDKITE_SHELL
I've tried setting the value to many things:
C:\Program Files\PowerShell\7\pwsh.exepwshpwsh -Command
I've also tried to call pwsh from within the hook, for example:
$scriptBlock = @{
# the actual script
}
pwsh ${scriptBlock}This worked for the environment.ps1 hook, but not in the others, not sure why 🤔
However the agent hooks always execute with PowerShell v5 instead. I'd prefer v7 since it's cross-platform, and would make it much easier to maintain the hooks (only need to be written once).
Is there a way to achieve this? Happy to contribute to a PR if needed. Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels