Open sdarwin opened 2 years ago
If this is an edge-case that nobody has ever encountered, the issue can probably be closed. Nevertheless, here are some ideas to mitigate it. Because the install process can be slow, any quick steps to precheck a success or failure are preferable to waiting many minutes to discover there is a problem.
Add a preflight check to "xcversion install" which occurs before downloading xcode or taking any actions. In the pre-check phase, make sure the user can write to the final destination folder. Write a very small file and then remove it. If the step fails, then clearly indicate which directory is lacking permissions.
Download the xip file. After the download, but before continuing further, verify the shasum, https://github.com/notpeter/apple-installer-checksums/blob/master/xcode.md . Display to the user that the download and checksum were successful. Unless, this is already being done, then nevermind :-)
This is happening to me today too. It's consistently failing every time for me, but the manual unxip works. I can't debug at all since running the command manually works and no useful information is being output by the xcversion command.
When installing multiple xcode versions, using a command such as:
There were occasionally errors such as this:
However,
The question is about those error messages. The above message included:
Permission to do what? Permission on which file or directory? Could the message be more verbose?
Xcode.app(or Xcode-beta.app)
found in XIP.Did not seem to be true, because I could manually unxip it. Also - if the problem really was " No
Xcode.app(or Xcode-beta.app)
found in XIP. " then why did it also say "permission denied"?