fix: improve update command resolution and restrict brew updates to stable#87
Merged
designcode merged 3 commits intomainfrom Apr 13, 2026
Merged
fix: improve update command resolution and restrict brew updates to stable#87designcode merged 3 commits intomainfrom
designcode merged 3 commits intomainfrom
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Homebrew check triggers falsely for npm installs with Homebrew Node
- I restored the update command logic to check Homebrew only after confirming binary mode so npm-installed users always receive the npm upgrade command.
Or push these changes by commenting:
@cursor push fdd3a724d9
Preview (fdd3a724d9)
diff --git a/src/utils/update-check.ts b/src/utils/update-check.ts
--- a/src/utils/update-check.ts
+++ b/src/utils/update-check.ts
@@ -106,15 +106,13 @@
* Returns the platform-appropriate shell command for updating the CLI.
*/
export function getUpdateCommand(): string {
- if (isHomebrewInstall()) {
- return 'brew upgrade tigris';
- }
-
const isBinary =
(globalThis as { __TIGRIS_BINARY?: boolean }).__TIGRIS_BINARY === true;
if (!isBinary) {
return 'npm install -g @tigrisdata/cli';
+ } else if (isHomebrewInstall()) {
+ return 'brew upgrade tigris';
} else if (process.platform === 'win32') {
return 'irm https://github.com/tigrisdata/cli/releases/latest/download/install.ps1 | iex';
} else {This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c16663e. Configure here.
MantasMiksys
approved these changes
Apr 12, 2026
When installed via npm, process.execPath points to Node — not our binary. If Node itself was installed via Homebrew, the Cellar path check would falsely return "brew upgrade" instead of "npm install -g". Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
🎉 This PR is included in version 2.18.0-beta.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.


Summary
execSync('brew list tigris')withrealpathSync(process.execPath)for Homebrew detection — faster (no subprocess) and correctly identifies this binary's install methodupdate-homebrewworkflow job to only run on thereleasebranch, preventing beta releases (viaworkflow_dispatch) from updating the Homebrew formulaTest plan
getUpdateCommand()returnsbrew upgrade tigriswhen running from a Homebrew-installed binarygetUpdateCommand()returns curl/npm commands for non-Homebrew installsupdate-homebrewjob is skipped onworkflow_dispatchrunsupdate-homebrewjob runs on pushes torelease🤖 Generated with Claude Code
Note
Medium Risk
Changes the CLI’s update-path detection and alters release automation conditions, which could impact the upgrade instructions shown to users and when the Homebrew formula is updated. Scope is small but affects distribution/update behavior.
Overview
Improves how the CLI decides which self-update command to suggest by detecting Homebrew installs via
realpathSync(process.execPath)instead of runningbrew, and by ordering checks to avoid misclassifying npm installs when Node itself comes from Homebrew.Restricts the
update-homebrewGitHub Actions job to only run for releases on thereleasebranch, preventingworkflow_dispatch/non-branch runs from updating the Homebrew formula.Reviewed by Cursor Bugbot for commit 8e6fcc5. Bugbot is set up for automated code reviews on this repo. Configure here.