feat: support suppressing update notification via SUPABASE_NO_UPDATE_NOTIFIER - #5959
feat: support suppressing update notification via SUPABASE_NO_UPDATE_NOTIFIER#5959PR1709 wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b7a9cc2b90
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| if shouldSkipUpdateNotifier() { | ||
| return | ||
| } |
There was a problem hiding this comment.
Preserve post-command suggestions when skipping updates
When SUPABASE_NO_UPDATE_NOTIFIER=1, this return exits Execute before the later utils.CmdSuggestion output, so successful commands that deliberately set an actionable follow-up—such as migration repair suggesting migration list—silently lose that output; the independent Claude plugin hint is also skipped. Scope the condition to the release check and upgrade message rather than returning from Execute.
Useful? React with 👍 / 👎.
Fixes #5853
Summary
Adds support for the
SUPABASE_NO_UPDATE_NOTIFIERenvironment variable to suppress the "A new version of Supabase CLI is available" update notification and skip the release check.When
SUPABASE_NO_UPDATE_NOTIFIERis set to a truthy value (1,true, etc.),Execute()skips checking GitHub for latest releases and suppresses the upgrade message on stderr.Testing
TestShouldSkipUpdateNotifierinapps/cli-go/cmd/root_test.gocovering truthy (true,1), falsy (false), and unset environment variable states.go test -v ./cmd -run TestShouldSkipUpdateNotifier.