ITADN

Allow configuring PowerShell shell instead of git bash on Windows

#1739OpenDarkPro1337 创建于 2026-02-05
feature
D
DarkPro1337commented
**Is your feature request related to a problem? Please describe.** Currently `gitlab-ci-local` always runs jobs using `git bash` shell on Windows. This makes it very hard or impossible to correctly run pipelines that are designed for GitLab Windows runners. In real GitLab CI we use Windows runners with `powershell` or `pwsh` shell. Many pipelines rely on: * PowerShell syntax in `before_script` / `script` * `$env:VAR` environment variables * PowerShell-specific error handling and behavior * modules and commands that only exist in Powershell --- **Describe the solution you'd like** Add an option to select the shell used by gitlab-ci-local, for example: * CLI flag: `--shell pwsh` or `--shell powershell` * config file option Expected behavior on Windows: * run job scripts via `pwsh` or `powershell` instead of git-bash * pass environment variables directly to that shell --- **Describe alternatives you've considered** *Tried workaround* Wrapping scripts into generated `.ps1` files and calling them from bash *Result* Fail due to environment variable isolation between bash and PowerShell processes and do not match real runner behavior. --- **Additional context** This feature would significantly improve `gitlab-ci-local` usability for Windows runners, PowerShell-based pipelines, Windows infrastructure projects, AD automation pipelines. Right now `gitlab-ci-local` works great for bash-based pipelines, but PowerShell pipelines cannot be reproduced faithfully.
2 条评论