Partially downloaded/damaged Xcode archives aren't checked before moved to download location
Open
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 4.8k
- Forks
- 182
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 1
Description
To reproduce:
- Run
xcodes download --latest-prerelease - Make it fail for some reason. I get:
Received 403: Unauthorized. This can happen when either:
1. Apple Developer Terms and Conditions were not accepted at https://developer.apple.com/
2. Apple ID authorization was revoked for some other reason
Even after I log in.
3. Run the downloaded command again
4. Get:
Updating...
Latest prerelease version available is 27.0 Beta 2
(1/1) Found existing archive at /Users/Admin/Library/Application Support/com.robotsandpencils.xcodes/Xcode-27.0.0-Beta.2+27A5209h.xip.
Xcode 27.0.0-Beta.2 has been downloaded to /Users/Admin/Downloads/Xcode-27.0.0-Beta.2+27A5209h.xip
Which is an invalid archive from the previous failed download.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing xcodes download --latest-prerelease, interrupting or failing the download, and running the command again. Trace the download and existing-archive handling to determine how the damaged Xcode archive is accepted; done means a failed archive is not reused or moved to the download location.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100