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
This pull request adds a clear signal for extension authors to detect when their program is being invoked by gh (vs executed directly), by setting GH_EXTENSION=1 for all extension dispatch paths. It also documents the new environment variable and adds both unit and acceptance coverage to prevent regressions across OS-specific dispatch logic.
Changes:
Set GH_EXTENSION=1 in the environment for extension processes launched via Manager.Dispatch.
Document GH_EXTENSION in gh help environment.
Add unit tests for environment propagation/override and a new end-to-end acceptance script covering the required scenarios.
Show a summary per file
File
Description
pkg/cmd/root/help_topic.go
Documents the new GH_EXTENSION environment variable in gh help environment.
pkg/cmd/extension/manager.go
Appends GH_EXTENSION=1 to the dispatched extension command’s environment.
pkg/cmd/extension/manager_test.go
Adds regression tests verifying GH_EXTENSION is set, overrides inherited values, and preserves other env entries.
acceptance/testdata/extension/extension-env.txtar
Adds an end-to-end acceptance script verifying GH_EXTENSION behavior for gh <ext>, gh extension exec, standalone execution, and documentation.
Activity