Repository navigation
Add xcode_license rule: accept the Xcode license and rerun the command - #12
Merged
Merged
Conversation
After an Xcode update git, make and clang refuse to run until the license is accepted, and the message names 'sudo xcodebuild -license'. The new xcode_license rule suggests accepting it and running the command again, and adds sudo when the command was xcodebuild -license itself. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QPakdNTeVS84QHcekDWY76
Owner
|
Merged, with a follow-up on top (c0705d4). Thank you for the rule and for the shape of it, which is what landed. I ran the commands on real macOS runners (Xcode 16.4 / macOS 15 and Xcode 26.6 / macOS 26) with the license reset. Two things differed from the fixtures:
The follow-up matches both real forms, drops the interactive second suggestion ( |
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
After an Xcode update, every tool behind the xcrun shims (
git,make,clang) refuses to run until the new license is accepted. Current Xcode prints the whole license and ends with:Older Xcode prints
You have not agreed to the Xcode license agreements, please run 'sudo xcodebuild -license' .... No rule matched either message, so The Bleep had no fix to offer.Details
sudo xcodebuild -license, unless the command already runs undersudo.sudo xcodebuild -license accept && <command>first, since the license was just printed in full. It also offerssudo xcodebuild -license && <command>for anyone who wants to read the license and typeagree. Commands are joined withshell.and_.xcodebuild -licenseitself, it just addssudo.xcodebuildexists. Listed in the README with the platform-specific rules, and the rule counts are updated.tests/rules/test_xcode_license.py.flake8passes, andtest_readme_claims,test_rule_qualityandtest_injectionall pass.thebleep --force-commandon a stub that prints Xcode's message suggestssudo xcodebuild -license accept && <command>.One unrelated test also fails locally on a clean
master:tests/rules/test_not_on_path.py::TestProjects::test_a_venv_in_the_parent, likely because my virtualenv lives inside the checkout.🤖 Generated with Claude Code