Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support to immediately delete Xcode and its XIPs #211

Merged
merged 3 commits into from
Sep 18, 2022

Commits on Sep 10, 2022

  1. Added --delete-xip flag to xcodes install

    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.
    juanjonol committed Sep 10, 2022
    Configuration menu
    Copy the full SHA
    1c7de08 View commit details
    Browse the repository at this point in the history
  2. Added --delete-app flag to xcodes uninstall

    This is equivalent to the `--delete-xip` flag that was added to `xcodes install` on the previous commit.
    juanjonol committed Sep 10, 2022
    Configuration menu
    Copy the full SHA
    49d5e82 View commit details
    Browse the repository at this point in the history
  3. Renamed --delete-xip and --delete-app flags to --empty-trash

    This two flags do essentially the same thing (skip the Trash and irrevocably delete Xcode or its .xip) so it makes sense to use the same name for both.
    
    - Although the Trash isn't really "emptied" (the files never get to the Trash in the first place), this is the most intuitively way I've found to refer to this at a high level.
    - Alternatives considered:
       - `--skip-trash`. This explains better the current implementation, but I think it's more ambiguous: if the user doesn't know that by default files are moved to the Trash, "skip Trash" could be understood as "skip deleting files from the Trash"...
       - `--delete-immediately` (the way Finder refers to deleting a single file from the Trash). This is longer to type, and "immediately" could imply that, without this flag, files will be automatically deleted in the future somehow.
    juanjonol committed Sep 10, 2022
    Configuration menu
    Copy the full SHA
    c49767b View commit details
    Browse the repository at this point in the history