Move XIPs to Trash instead of immediately deleting them#60
Merged
interstateone merged 2 commits intoXcodesOrg:masterfrom Jul 30, 2019
Merged
Conversation
c0c0393 to
c1c9f0e
Compare
This allows user intervention if installation fails without requiring them to re-download the XIP, and doesn't add any* steps to the happy path. Resolves XcodesOrg#56.
c1c9f0e to
ad9b620
Compare
MattKiazyk
approved these changes
Jul 29, 2019
juanjonol
added a commit
to juanjonol/xcodes
that referenced
this pull request
Sep 10, 2022
After Pull Request XcodesOrg#60, `xcodes` always moves Xcode's .xip to the Trash after installation. This is problematic for scripts, because on modern macOS versions, [Full Disk Access is required to programatically delete the Trash](https://apple.stackexchange.com/questions/376916/cannot-ls-trash-in-the-terminal-in-catalina-operation-not-permitted). To solve this without reducing security, added a new `--delete-xip` flag that automatically deletes the .xip after a successful installation. - This is done this way to preserve the current behaviour (moving the .xip to the Trash) by default, [as it was originally intended](XcodesOrg#56 (comment)). This closes XcodesOrg#185.
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.

This changes the installation behaviour to move XIPs to the Trash after Xcode has been installed to /Applications instead of immediately deleting them. This more closely matches the steps users take when downloading Xcode XIPs manually, but more importantly it provides a way to recover from installation issues without downloading the (very large) XIPs all over again.
Closes #56