Skip to content

feat(cli): allow suppressing update notifier via SUPABASE_NO_UPDATE_NOTIFIER#5902

Open
GMartinho wants to merge 1 commit into
supabase:developfrom
GMartinho:feat/no-update-notifier
Open

feat(cli): allow suppressing update notifier via SUPABASE_NO_UPDATE_NOTIFIER#5902
GMartinho wants to merge 1 commit into
supabase:developfrom
GMartinho:feat/no-update-notifier

Conversation

@GMartinho

Copy link
Copy Markdown

What

Adds a SUPABASE_NO_UPDATE_NOTIFIER environment 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 with SUPABASE_ to match the CLI's other environment variables) to turn it off.

Notes

  • The variable is read directly from the environment (os.Getenv + strconv.ParseBool) rather than through viper, because the upgrade check in Execute() also runs for --help and --version, which bypass the cobra.OnInitialize hook that configures viper's automatic env binding. Reading it directly makes suppression work consistently across every invocation. Boolean semantics match viper.GetBool (used by SUPABASE_DEBUG etc.).
  • When disabled, the network call to GitHub is skipped entirely, not just the message — so pinned installs make no release request at all.
  • Behavior unchanged when the variable is unset or falsy (0/false).

@GMartinho
GMartinho requested a review from a team as a code owner July 18, 2026 15:11
…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
GMartinho force-pushed the feat/no-update-notifier branch from 8b35b76 to 7df2169 Compare July 18, 2026 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support suppressing "A new version of Supabase CLI is available" message

1 participant