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
Add Environment Variable to Skip Latest Extension Version Check #9925
Using a modified local version of an extension shows updates on every run, which I consider false positives since I don't want to upgrade. Also, a small delay of about one second has been added, which is unwanted after exiting an extension.
Proposed solution
Ability to skip checking for the latest extension version.
Extend GH_NO_UPDATE_NOTIFIER to silence extension update messages, or introduce a new variable specifically for extensions.
Additional context
This request is related to issue #743, where an environment variable was added to silence update messages.
When I run the extension, I see the following message, which I don't want to see:
gh notify -an 1
A new release of notify is available: b39386a96a4e105dc3e5f34a447bdc011c9e8098 → 556df2eecdc0f838244a012759da0b76bcfeb2e7
To upgrade, run: gh extension upgrade notify
[email protected]:meiji163/gh-notify.git
Thank you for sharing feedback on the new extension update checking feature and sharing suggestions on how to improve it, @LangLangBart! 🙇 Extending the GH_NO_UPDATE_NOTIFIER and dropping the 1 second timeout make sense. 👍
Whether we should have a separate environment variable for extensions or not is a good question. 🤔 The cmd.go logic involved has a little bit of complexity especially with the updaterEnabled which looks like it would be statically set during compilation but I can't find anything that is changing its value:
All of that aside, I'll admit I struggled a bit with some of the complexity of the different extension types and whether to duplicate or completely refactor the update logic to cache information about the latest release found:
Circling back to this issue now that v2.66.0 has been released, the team decided to use the new GH_NO_EXTENSION_UPDATE_NOTIFIER environment variable for opting out of extension update notices. This will give users greater control over awareness of new features, bug fixes, or security without making it all or nothing.
Otherwise, extension update notices are now on par with core gh notices.
Activity
andyfeller commentedon Nov 16, 2024
Thank you for sharing feedback on the new extension update checking feature and sharing suggestions on how to improve it, @LangLangBart! 🙇 Extending the
GH_NO_UPDATE_NOTIFIERand dropping the 1 second timeout make sense. 👍Whether we should have a separate environment variable for extensions or not is a good question. 🤔 The
cmd.gologic involved has a little bit of complexity especially with theupdaterEnabledwhich looks like it would be statically set during compilation but I can't find anything that is changing its value:cli/internal/ghcmd/cmd.go
Lines 219 to 238 in 9decf1b
All of that aside, I'll admit I struggled a bit with some of the complexity of the different extension types and whether to duplicate or completely refactor the
updatelogic to cache information about the latest release found:cli/internal/update/update.go
Lines 22 to 56 in 9decf1b
From #6977, it appears this
updaterEnabledis being set via Homebrew in https://github.com/Homebrew/homebrew-core/blob/5269b1788711898ab5732f74bf781b1e9f6ba7e4/Formula/g/gh.rb#L27-L43Roxyfundz1 commentedon Nov 25, 2024
andyfeller commentedon Jan 30, 2025
Circling back to this issue now that
v2.66.0has been released, the team decided to use the newGH_NO_EXTENSION_UPDATE_NOTIFIERenvironment variable for opting out of extension update notices. This will give users greater control over awareness of new features, bug fixes, or security without making it all or nothing.Otherwise, extension update notices are now on par with core
ghnotices.For more information, see
gh help environmentdocsbuild(deps): update cli/cli to v2.66.1