Skip to content

Fix CLI Homebrew tap updates#1484

Merged
ChiragAgg5k merged 1 commit intomasterfrom
codex/fix-cli-homebrew-tap-update
Apr 28, 2026
Merged

Fix CLI Homebrew tap updates#1484
ChiragAgg5k merged 1 commit intomasterfrom
codex/fix-cli-homebrew-tap-update

Conversation

@ChiragAgg5k
Copy link
Copy Markdown
Member

@ChiragAgg5k ChiragAgg5k commented Apr 28, 2026

Summary

  • Detect the actually installed Homebrew formula and use it consistently for latest-version checks, automatic updates, and manual instructions.
  • Warn when the installed formula is not the official Appwrite tap, recommend the tap for faster native binaries, and keep updating the currently installed formula.
  • Avoid automatic formula migration; users get an explicit migration command instead.

Verification

  • docker run --rm -v $(pwd):/app -w /app php:8.3-cli php example.php cli
  • composer lint-twig
  • bun run build:types in examples/cli

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 28, 2026

Greptile Summary

This PR improves the Homebrew update flow by detecting the actually installed formula (appwrite core vs. appwrite/appwrite/appwrite tap) and using it consistently for version checks, automatic upgrades, manual instructions, and error hints. Previously flagged gaps — the hardcoded formula in showManualInstructions and the missing timeout on brew list — are both addressed.

Confidence Score: 5/5

Safe to merge; only a minor variable-shadowing style nit remains.

All previously flagged P1 issues (manual-instructions hardcoding, missing brew list timeout) are resolved in this PR. The remaining finding is a P2 style issue (variable shadowing) with no runtime impact.

No files require special attention.

Important Files Changed

Filename Overview
templates/cli/lib/commands/update.ts Adds formula detection helpers, threads the detected formula through updateViaHomebrew, showManualInstructions, and updateCli; previously flagged issues around manual instructions and error-hint consistency are now resolved.
templates/cli/lib/utils.ts Adds getInstalledHomebrewFormula (exported), adds full_name to HomebrewInfoResponse, extends LatestVersionOptions with homebrewFormula, and threads the detected formula through getHomebrewLatestVersion and getCachedUpdateNotification; logic is sound.

Reviews (8): Last reviewed commit: "Fix CLI Homebrew tap updates" | Re-trigger Greptile

Comment thread templates/cli/lib/commands/update.ts Outdated
Comment thread templates/cli/lib/commands/update.ts Outdated
@ChiragAgg5k ChiragAgg5k force-pushed the codex/fix-cli-homebrew-tap-update branch 2 times, most recently from 7f7f8b4 to 712baf6 Compare April 28, 2026 03:38
@ChiragAgg5k
Copy link
Copy Markdown
Member Author

Addressed review comments:\n\n- The destructive uninstall/install migration path is no longer present. For non-Appwrite-tap Homebrew installs, the CLI now warns, suggests the explicit tap install command, and continues with brew upgrade <installed-formula>.\n- Added bounded timeouts for Homebrew execFileSync calls, including brew list --formula --full-name, while preserving shorter update-check timeouts when provided.\n\nRe-verified with CLI regeneration, composer lint-twig, and bun run build:types in examples/cli.

@ChiragAgg5k ChiragAgg5k force-pushed the codex/fix-cli-homebrew-tap-update branch 6 times, most recently from bd438af to b5b0f48 Compare April 28, 2026 04:17
@ChiragAgg5k ChiragAgg5k force-pushed the codex/fix-cli-homebrew-tap-update branch from b5b0f48 to 6fbadbd Compare April 28, 2026 04:33
@ChiragAgg5k ChiragAgg5k merged commit b77e0d8 into master Apr 28, 2026
92 of 93 checks passed
@ChiragAgg5k ChiragAgg5k deleted the codex/fix-cli-homebrew-tap-update branch April 28, 2026 04:50
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.

1 participant