Skip to content

installer: skip platform prompt when tools already installed; fix Xcode false positive#124

Merged
droid-ash merged 1 commit intomainfrom
claude/installer-skip-ready-platforms
Apr 27, 2026
Merged

installer: skip platform prompt when tools already installed; fix Xcode false positive#124
droid-ash merged 1 commit intomainfrom
claude/installer-skip-ready-platforms

Conversation

@droid-ash
Copy link
Copy Markdown
Contributor

Summary

Two related installer changes.

1. Skip the platform prompt when host tools are already installed. Previously the "Which platform(s) would you like to set up host tools for?" prompt fired every time, even on a re-run where Android Studio + scrcpy + Xcode + applesimutils were all already present.

Now the installer runs a precheck before the prompt:

  • Android ready = SDK path resolves (ANDROID_HOME / ANDROID_SDK_ROOT / /Applications/Android Studio.app) AND scrcpy on PATH.
  • iOS ready (mac only) = xcrun -f simctl succeeds AND applesimutils on PATH.

When every relevant platform is ready, the installer prints one line per platform (✓ <Platform> tools detected — skipping setup.), sets PLATFORM_CHOICE so run_doctor still verifies, and proceeds. Partial states (e.g. Android ready, iOS not) keep the existing 1/2/3 prompt — partial cases are uncommon and dynamically rewriting the menu adds more surface area than it removes.

2. Fix the Xcode false-positive in setup_ios. A user reported "✓ Xcode detected" on a machine that didn't actually have Xcode. The cause: xcode-select -p succeeds for both full Xcode AND Command Line Tools-only installs (CLT is the smaller install you get when you git and macOS prompts you to install developer tools — many devs have CLT without ever installing Xcode).

Replaced the check with xcrun -f simctl. simctl is the iOS Simulator control tool, ships with Xcode, and is absent from CLT-only installs. xcrun -f is a path lookup so it doesn't trigger a license check. The misleading "Installing Xcode Command Line Tools..." branch is removed — CLT alone never satisfies iOS testing.

When the new check fails, the error message distinguishes two cases:

  • xcode-select -p returns nothing → "Install Xcode from the App Store, launch it once to accept the license."
  • xcode-select -p returns a CLT path → "iOS simulators need the full Xcode app, not just Command Line Tools. Install Xcode and run sudo xcode-select -s /Applications/Xcode.app/Contents/Developer."

Same xcrun -f simctl test feeds both setup_ios and the new ios_ready precheck, so detection and setup agree.

Changes

  • scripts/install.sh
    • New android_ready / ios_ready / maybe_skip_platform_setup helpers.
    • main() calls maybe_skip_platform_setup and bypasses prompt_platform + setup_host_tools on success.
    • setup_ios switched from xcode-select -p to xcrun -f simctl; CLT-vs-nothing branched error messages; removed the xcode-select --install branch.
  • scripts/install.ps1
    • New Test-AndroidReady helper.
    • Invoke-Main skips Read-AndroidPrompt + Install-Android when Test-AndroidReady is true; doctor still runs.

Test plan

  • Mac with Studio + scrcpy + Xcode + applesimutils installed: prompt is skipped, both ✓ detected lines print, doctor runs against all.
  • Mac with nothing installed: 1/2/3 prompt appears as before.
  • Mac with Android ready + iOS missing: 1/2/3 prompt appears as before.
  • Mac with CLT-only (no Xcode): setup_ios prints "Xcode app not active" with the xcode-select -s instruction, instead of "✓ Xcode detected".
  • Mac with no developer tools at all: setup_ios prints "Xcode not found" with App Store + license instructions.
  • Linux with Android ready: prompt is skipped, single ✓ Android tools detected line, doctor runs against android.
  • Windows with Android ready: PowerShell prompt is skipped, doctor runs against android.
  • --ci / -CI mode: section is unchanged (already short-circuited before this code path).

🤖 Generated with Claude Code

…de false positive

Skip the "Which platform(s) would you like to set up host tools for?"
prompt when every relevant platform is already detected as ready.
Detection matches the existing setup_* checks:
- Android: SDK path resolves AND scrcpy on PATH
- iOS (mac only): xcrun -f simctl succeeds AND applesimutils on PATH

When all relevant platforms are ready the installer prints one
"✓ <Platform> tools detected — skipping setup." line per platform,
sets PLATFORM_CHOICE so run_doctor still verifies, and proceeds.
Partial states (e.g. Android ready, iOS not) keep the existing
prompt — partial cases are uncommon and tracking them adds surface
area.

Also fixes a false-positive in setup_ios: the previous check
`xcode-select -p` succeeded for both full Xcode AND Command Line
Tools-only installs, so users with CLT (often installed for git)
saw a misleading "✓ Xcode detected" before the install failed
later. `xcrun -f simctl` is the canonical Xcode-vs-CLT signal —
simctl ships with Xcode and is absent from CLT-only installs, and
`xcrun -f` is a path lookup so it doesn't trigger a license check.

The "install Command Line Tools" branch in setup_ios is removed —
CLT alone never satisfies iOS testing, so suggesting it as a fix
was wrong. Error messages now distinguish the CLT-only case
(suggest `sudo xcode-select -s` after installing Xcode) from the
nothing-installed case (install Xcode from the App Store).

Same skip behavior in install.ps1 (Android-only on Windows).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 27, 2026

Warning

Rate limit exceeded

@droid-ash has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 20 minutes and 33 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f48f1d67-267c-4055-a436-1326844ce2cd

📥 Commits

Reviewing files that changed from the base of the PR and between 7ebd25b and 7e18920.

📒 Files selected for processing (2)
  • scripts/install.ps1
  • scripts/install.sh
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/installer-skip-ready-platforms

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@droid-ash droid-ash self-assigned this Apr 27, 2026
@droid-ash droid-ash added the enhancement New feature or request label Apr 27, 2026
@droid-ash droid-ash merged commit 67e3035 into main Apr 27, 2026
1 check passed
@droid-ash droid-ash added bug Something isn't working and removed enhancement New feature or request labels Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant