Jobs with release keyword fail on Windows with PowerShell executor

Checklist

  • I'm using the latest version of the extension: glab 1.58.0 (676a7ced)
  • Operating system and version: Windows Server 2022 Standard, 21H2
  • Gitlab.com or self-managed instance? gitlab.com
  • I have performed glab auth status to check for authentication issues
  • Run the command in debug mode (like DEBUG=true glab mr list) and attach any useful output - it doesn't appear to be an issue with the CLI itself so I don't think this is applicable

Summary

Jobs with the release keyword fail on PowerShell shell executors.

It appears the GitLab Runner (version 18.0.2) tries to detect the GitLab CLI version with a regex via PowerShell. According to the error message, its using 'd+.d+.d+' to extract the version number from glab --version. I believe each d should be escaped, so the regex should be '\d+\.\d+\.\d+'.

I found a post in the forums about the same issue, and they came to the same conclusion. Given this post hasn't had any responses and the release-cli fallback is due to be removed in 19.0, I wanted to raise awareness, as we'll be stuck without it.

Environment

  • OS: Windows Server 2022, 21H2
  • SHELL: PowerShell
  • TERM: N/A
  • GLAB: glab 1.58.0 (676a7ced)