Skip to content

script/macos/bootstrap fails when Xcode is installed via Xcodes app or under a non-default name #10125

@SagarSDagdu

Description

@SagarSDagdu

Summary

script/macos/bootstrap hardcodes a check for /Applications/Xcode.app and a sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer. This breaks for users who install Xcode via the Xcodes app, where installations are named like Xcode-26.3.0.app or Xcode-beta.app. The script exits with "Please install Xcode from the App Store before continuing." even though a fully functional Xcode is installed.

Steps to reproduce

  1. Install Xcode via the Xcodes app (so it lands at /Applications/Xcode-26.3.0.app rather than /Applications/Xcode.app).
  2. Ensure xcode-select -p points at that install (e.g. /Applications/Xcode-26.3.0.app/Contents/Developer).
  3. Run ./script/macos/bootstrap.

Expected behavior

The script detects the existing Xcode installation (regardless of its .app filename) and proceeds.

Actual behavior

The script fails immediately at the [ -d "/Applications/Xcode.app" ] check and prints "Please install Xcode from the App Store before continuing."

Environment

  • macOS, Xcode installed via Xcodes app.
  • Affected file: script/macos/bootstrap (lines 8–13).

Notes

A complete fix should: (a) accept any /Applications/Xcode*.app name, (b) detect when only Command Line Tools is selected and either switch to a discovered full Xcode or fail with the intended error, and (c) preserve the existing auto-xcode-select --switch behavior so users with a full Xcode installed but CLT currently selected don't have to fix selection by hand.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:launch-configsLaunch configurations, workflows, tab configs, and automation entry points.bugSomething isn't working.os:macmacOS-specific behavior, regressions, or requests.ready-to-implementThe issue is ready for implementation work.repro:highThe report includes enough evidence that the issue appears highly reproducible.triagedIssue has received an initial automated triage pass.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions