You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tell extensions when they are run as extensions and not standalone #14071
This looks like an enhancement request: the author wants gh to set a GH_EXTENSION=1 (or similar) environment variable when invoking an extension, so extension authors can detect whether their program is running as a gh extension or directly as a standalone binary. No duplicates were found. Suggesting the enhancement label for maintainer approval.
Thank you for your issue! We have categorized it as an enhancement (feature or improvement) request, and it has been added to our backlog. In doing so, we are not committing to implementing this feature at this time, but, we will consider it for future releases based on community feedback and our own product roadmap.
Unless you see the
help wantedContributions welcome
label, we are not currently looking for external contributions for this feature.
If you come across this issue and would like to see it implemented, please add a thumbs up! This will help us prioritize the feature. Please only comment if you have additional information or viewpoints to contribute.
Given I have an extension installed that prints the value of the GH_EXTENSION env var
When I run gh <my ext>
Then I see that GH_EXTENSION is set to 1
Given I have an extension installed that prints the value of the GH_EXTENSION env var
When I run gh extension exec <my ext>
Then I see that GH_EXTENSION is set to 1
Given I have an extension installed that prints the value of the GH_EXTENSION env var
When I run the extension directly (not via gh)
Then I see that GH_EXTENSION is set to 0
When I run gh help environment
Then I see that the GH_EXTENSION env var is documented
Activity
cli-triage commentedon Aug 5, 2026
This looks like an enhancement request: the author wants
ghto set aGH_EXTENSION=1(or similar) environment variable when invoking an extension, so extension authors can detect whether their program is running as aghextension or directly as a standalone binary. No duplicates were found. Suggesting theenhancementlabel for maintainer approval.github-actions commentedon Aug 5, 2026
Thank you for your issue! We have categorized it as an enhancement (feature or improvement) request, and it has been added to our backlog. In doing so, we are not committing to implementing this feature at this time, but, we will consider it for future releases based on community feedback and our own product roadmap.
Unless you see the help wantedContributions welcome
label, we are not currently looking for external contributions for this feature.
If you come across this issue and would like to see it implemented, please add a thumbs up! This will help us prioritize the feature. Please only comment if you have additional information or viewpoints to contribute.
williammartin commentedon Aug 5, 2026
Acceptance criteria
williammartin commentedon Aug 5, 2026
Hope #14072 works for you @heaths, otherwise we can iterate on it.