Skip to content

gh.exe (Windows) wrongly reporting 0.0.0.0 for File Version & no Copyright info #13079

@kilasuit

Description

@kilasuit

Describe the bug

Image

Affected version

gh version 2.89.0 (2026-03-26)
https://github.com/cli/cli/releases/tag/v2.89.0

Steps to reproduce the behavior

  1. install latest release
  2. Navigate to install path
  3. open file properties in explorer & navigate to details tab

Expected vs actual behavior

File Version shouldn't be 0.0.0.0 & should return correctly & Copyright should be filled out

Additional Notes

This was found as PowerShell returns 0.0.0.0 for the Version when running
get-command gh or gcm gh for short & I wondered if this was a PowerShell display issue or as found an issue with the metadata being stamped into gh.exe as part of the build process.

Image

Even though from the below FileVersion & ProductVersion seem to be returning correctly.

Image

I've also previously reported a similar & still unfixed issue with Hugo missing similar metadata from the Windows executable that would be useful to have return correctly for Administrators and Users.

I have tried digging into this further to understand where in this repo any fixes may need to be added though I am not well enough versed in go to attempt to fix this

The last Release action run
https://github.com/cli/cli/actions/runs/23598808509/job/68722777870#step:8:25
Points to
https://github.com/cli/cli/blob/trunk/script/gen-winres.ps1
which uses
https://github.com/cli/cli/blob/trunk/script/versioninfo.template.json
which I think is what needs updating to be able to fix this going forward

Priority

Low

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions