Repository navigation
Resolve sdkmanager by its known layouts, and say what is there when it is not - #526
Merged
Merged
Conversation
…t is not My fix in #519 was off by one. It searched with find -maxdepth 2 under cmdline-tools, but the file sits at cmdline-tools/latest/bin/sdkmanager, three levels down -- so the search stopped at the bin directory and reported the file missing while it was there. Run 38164077038 said so in one line, which is what that PR's other half bought: the message named the right cause, so the real defect took one look instead of another suspicion about dl.google.com. This replaces the find with the three known layouts in order -- cmdline-tools/latest/bin, cmdline-tools/<version>/bin and the old tools/bin -- which is both correct and readable, and cannot be off by one again. The outer loop over ANDROID_HOME, ANDROID_SDK_ROOT and the image path now stops once one answers: the inner break leaves only the inner loop, so a later root could otherwise overwrite the found path. That guard is an if rather than a trailing test-and-break, which under set -e would end the step the moment the test is false. And the part #519 still lacked: when nothing is found, the step now lists what IS under each root. Naming only the places searched leaves three different causes -- no directory, no version subdirectory, no file -- behind one message, and a reader cannot tell them apart. The listing loop deliberately has no early break, so it reports every root. Validated locally against five faked layouts: latest (what CI has), a version directory without latest, the old tools/bin, an empty SDK that must fail, and a first root that is empty with the second carrying the file. Both copies of the step are fixed identically; check-run-scripts.py parses all 161 scripts, the release gate and the natives list are unchanged. A trap recorded in TODO.md for whoever tests such a step on this checkout: chmod +x does not stick on a plain file here, so [ -x ] answers false and the first run of that probe called all five layouts broken -- including the one that demonstrably works in CI. The fixtures needed a shebang; it was the harness, not the logic. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E2h8gXyyE5UeimkL9vQv9G
bernardladenthin
had a problem deploying
to
maven-central
October 11, 2026 19:15 — with
GitHub Actions
Failure
bernardladenthin
had a problem deploying
to
maven-central
October 11, 2026 19:15 — with
GitHub Actions
Failure
|
This branch had an error being deployed
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.



My fix in #519 was off by one. It searched with
find "$root/cmdline-tools" -maxdepth 2, but thefile sits at
cmdline-tools/latest/bin/sdkmanager— three levels belowcmdline-tools— so thesearch stopped at the
bindirectory and reported the file missing while it was there.Run 38164077038 said so in one line:
Which is exactly what #519's other half bought. The message named the right cause, so the real
defect took one look instead of another round of suspecting
dl.google.com.The change
cmdline-tools/latest/bin,cmdline-tools/<version>/bin, the oldtools/binbreakleaves only the inner loop, so a later root could otherwise overwrite the found pathif, not a trailingtest && breakset -ea trailing&&list ends the step the moment the test is falseThat last one is the lesson repeating: naming only the places searched leaves three different
causes — no directory, no version subdirectory, no file — behind one message, and a reader cannot tell
them apart. The listing loop deliberately has no early break, so it reports every root.
Validated locally against five layouts
cmdline-tools/latest/bin(what CI has)latesttools/binOne trap worth knowing before testing such a step here
On this Windows checkout
chmod +xdoes not stick on a plain file (ls -lstill showsrw-r--r--), so[ -x ]answers false. The first run of that probe called all five layouts broken— including the one that demonstrably works in CI. The fixtures needed a
#!/bin/shline: it was theharness, not the logic. Recorded in
TODO.md.Still unproven
The emulator jobs have not been green since the pre-install step was added, so the thing it was built
to survive — the corrupt archive of run 38069595101 — remains unverified. Said in
TODO.mdratherthan implied by a green run.
check-run-scripts.py161 scripts clean (itbash -ns both copies),check-release-gate.py0violations,
check-natives.py0 disagreements.🤖 Generated with Claude Code
https://claude.ai/code/session_01E2h8gXyyE5UeimkL9vQv9G