Repository navigation
feat(cli): offer to install fastlane with Homebrew for the fastlane APNs key setup - #1998
Merged
ArnabChatterjee20k merged 4 commits intoOct 9, 2026
Conversation
The fastlane APNs key setup stopped with a bare 'needs fastlane' when none was installed. When Homebrew is available it now asks to run brew install fastlane on the terminal and carries on. Without Homebrew, a terminal or a yes, it says how to install fastlane (Homebrew, gem or the project's Gemfile) or to use --provider appwrite. An installed fastlane older than 2.225.0 now gets the matching upgrade command: bundle update fastlane for a project's Bundler fastlane, otherwise brew upgrade or gem update. A project's pinned fastlane and an explicit command are never replaced by an install.
🟢 Tier S · Ready to mergeThe fastlane APNs setup offers an opt-in Homebrew installation when fastlane is missing and provides installation or upgrade guidance when setup cannot proceed. It preserves project Gemfile/Bundler selection and explicitly configured fastlane commands, and quotes project paths in the Bundler upgrade hint. Tests cover installation behavior, guidance, and quoted shell paths. Latest changes: The newest commit adds shell quoting for the Bundler upgrade path and tests quoting behavior, including a POSIX shell check for paths containing spaces and quotes.
📂 Walkthrough · 2
✅ Fixed since the last review · 1
Reviewed the commits since |
…er hint A fastlane command set on the adapter was offered a Homebrew install when it was missing, which could replace a deliberate choice; the offer is now only for fastlane from PATH. The too-old message for a project's Bundler fastlane said 'bundle update fastlane in <folder>', which Bundler reads as gem names; it now says 'cd <folder> && bundle update fastlane'.
cd <folder> && bundle update fastlane broke for folders with spaces: the shell split the path. The folder is now quoted for the shell people paste into, single quotes on Unix (with a single quote in the name escaped) and double quotes on Windows, and left as is when it has only safe characters.
Double quotes are not safe on Windows: PowerShell expands $name and $() inside them, so a folder name could change the pasted command or run an expression, cmd expands %, and Windows PowerShell has no &&. No single quoting works in every Windows shell, so the Bundler upgrade hint there names the folder to run bundle update fastlane from. Unix keeps the single-quoted cd command.
ArnabChatterjee20k
merged commit Oct 9, 2026
89ea7ee
into
messaging-provider-cli-apns
54 of 61 checks passed
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.
Stacked on #1963. When fastlane is missing,
--provider fastlanenow offers to install it with Homebrew, and otherwise explains how to install or upgrade it.What
Before, the fastlane APNs key setup stopped with "needs fastlane 2.225.0 or later installed" and nothing more. Now:
brew install fastlaneon the terminal and continues with the key setup.bundle update fastlane in <folder>for a project's Bundler fastlane, otherwisebrew upgrade fastlane, or gem update fastlanebundle exec fastlane, and never installs a different oneWhy only Homebrew
Homebrew's fastlane brings its own Ruby and installs in one step on macOS (and Linux with Homebrew).
gem install fastlaneneeds a working Ruby, and some of its about 70 dependencies need a C compiler. The macOS system Ruby is old and needssudoto install gems. So gem and Bundler stay instructions rather than something the CLI runs. Installing changes the system, so the CLI always asks first. The answer "No", or no terminal, means no install.Tests
TestCreateKeyInstallsFastlaneWithHomebrew: with only a stand-inbrewon PATH, answering yes runsbrew install fastlaneonce, logs it, and the key is created with the fastlane it installed.TestCreateKeyDoesNotInstallFastlaneWhenDeclined: answering no never runsbrew, and the error has the install instructions.TestCreateKeyExplainsHowToInstallFastlane: without fastlane or Homebrew,apns.ErrUnavailablenames brew, gem, the Gemfile and--provider appwrite.TestOldFastlaneSaysHowToUpgrade: the upgrade command is in the too-old message.-race), gofmt, the WebAssembly browser build,GOOS=windows go vetfor the apns packages and the Generation suite pass.