XcodesOrg / xcodes

The best command-line tool to install and switch between multiple versions of Xcode.
MIT License
3.66k stars 122 forks source link

Add the ability to delete the xip file completely #185

Closed tahirmt closed 1 year ago

tahirmt commented 2 years ago

The default behavior of moving the xip file to the trash after it is installed makes sense but I think it would be beneficial to add an option to delete the file completely instead so we don't have to do the manual process of cleaning trash afterwards

juanjonol commented 2 years ago

+1 to this. In my case, I'm automating xcodes with a script, and this behavior is problematic because scripts cannot read the Trash (unless they have Full Disk Access, reducing security).

I do agree with the initial idea that the .xip should be preserved by default, so maybe adding a --delete-xip flag to xcodes install would be the best?

davdroman commented 2 years ago

Additionally, I'd appreciate a --delete-app flag for xcodes uninstall as well. Moving it to the Trash alone is not really useful since it requires emptying the Trash afterwards (which takes ages compared to rm -r).

fkorotkov commented 2 years ago

This is specifically a problem when SIP is enabled and seems there is no way to programmatically clean trash.