Skip to content

Release keyword with assets.links fails on Windows GitLab Runner (PowerShell) due to glab argument parsing

Checklist

  • I'm using the latest version of the extension (Run glab --version)
    • Extension version: Put your extension version here
  • Operating system and version: Put your version here
  • Gitlab.com or self-managed instance? gitlab.com/self-managed instance/both
  • GitLab version (if self-managed) GitLab version here (Use the version endpoint, like this: gitlab.my-company.com/api/v4/version)
  • 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

Summary

I am running Gitlab CI and creating release using release keyword. Below is part of my .ci File

  script:
    - Write-Host "Making Final Release and Tag"

  release:
    name: ${CI_PIPELINE_ID}_Release
    tag_name: ${CI_PIPELINE_ID}_Release       # The version is incremented per pipeline.
    description: RELEASE_NOTE.md
    assets:
      links:
        - name: 'SoftwareExecutables'
          url: 'https://python.org'

after running this, I get following error

ERROR: CreateFile url\:\https://python.org\,\name\:\SoftwareExecutables\}]: The filename, directory name, or volume label syntax is incorrect.

Environment

  • OS: Windows
  • SHELL:Powershell
  • TERM:
  • GLAB: 1.72.0
  • Gitlab runner version: 18.3.1
  • Gitlab Version: 18.2

Other:

Steps to reproduce

What is the current bug behavior?

After running CI, I get error about the link.

What is the expected correct behavior?

I expected release should be created. If I remove asset part from yml then release is created.

Relevant logs and/or screenshots

DEBUG:  344+        >>>> glab release create -R $env:CI_PROJECT_PATH "12004_Release" --assets-links "[{\"url\":\"https://python.org\",\"name\":\"SoftwareExecutables\"}]" --name "12004_Release" --experimental-notes-text-or-file "RELEASE_NOTE.md" --ref "$env:CI_COMMIT_SHA" --no-update --no-close-milestone ERROR: CreateFile url\:\https://python.org\,\name\:\SoftwareExecutables\}]: The filename, directory name, or volume label syntax is incorrect.

Possible fixes

PowerShell is interpreting the JSON argument as a file path instead of passing it correctly to glab. This is a Windows-specific bug in how glab or GitLab Runner handles quoting/escaping of --assets-links arguments.

Edited by AbDhops
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information