feat(cli): allow suppressing update notifier via SUPABASE_NO_UPDATE_NOTIFIER#5902
Open
GMartinho wants to merge 1 commit into
Open
feat(cli): allow suppressing update notifier via SUPABASE_NO_UPDATE_NOTIFIER#5902GMartinho wants to merge 1 commit into
GMartinho wants to merge 1 commit into
Conversation
…OTIFIER The CLI checks GitHub for a newer release after every command and prints an upgrade suggestion to stderr. Users who pin the CLI version through a package manager such as Nix have no way to opt out of this check. Add a SUPABASE_NO_UPDATE_NOTIFIER environment variable that, when set to a truthy value, skips both the release check and the suggestion. The variable is read directly from the environment rather than through viper because the upgrade check also runs for --help and --version, which bypass the cobra initializer that configures viper's automatic env binding. Closes supabase#5853
GMartinho
force-pushed
the
feat/no-update-notifier
branch
from
July 18, 2026 15:18
8b35b76 to
7df2169
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a
SUPABASE_NO_UPDATE_NOTIFIERenvironment variable that suppresses the "A new version of Supabase CLI is available" upgrade notifier. When set to a truthy value (1,true, …), the CLI skips both the GitHub release check and the stderr suggestion.Why
Closes #5853. Users who pin the CLI version through a package manager such as Nix are intentionally on a fixed version and have no way to opt out of the periodic upgrade check and its message. This gives them a standard, npm-style env var (
NO_UPDATE_NOTIFIER, prefixed withSUPABASE_to match the CLI's other environment variables) to turn it off.Notes
os.Getenv+strconv.ParseBool) rather than through viper, because the upgrade check inExecute()also runs for--helpand--version, which bypass thecobra.OnInitializehook that configures viper's automatic env binding. Reading it directly makes suppression work consistently across every invocation. Boolean semantics matchviper.GetBool(used bySUPABASE_DEBUGetc.).0/false).