Closed ffittschen closed 3 years ago
Thanks for the PR @ffittschen - I'm curious what the result was on your machine with that change?
I didn't see the result, but I figured out the issue:
We are using xcodes
within ansible playbooks to manage our Xcode installations on the CI machines. As the xcodes install
command interactively asks for a password, we run the command using become: true
to avoid this. As it turns out, subsequently calling xcodes uninstall
without become: true
results in the error I posted above. But when I add become: true
to the uninstall call, the Xcode.app is actually moved to /private/var/root/.Trash/
instead of ~/.Trash/
. As a workaround I added an "Empty trash" task after the uninstall task, which is not great 😄 Ideally, the xcodes uninstall
command would have a --force
option to avoid the empty trash step, but that's another topic and I'll open an issue for that to discuss it 🙂
Do you happen to have any suggestions on how to run xcodes install / uninstall
without sudo
or become: true
in a non-interactive way?
@ffittschen I'm going to merge this in and release it. If you want - can you open up an issue to talk about the other issue you've brought up.
Thanks for the PR - sorry it took so long to get through
I'm currently trying to uninstall Xcode 12.5 Beta 3 using
xcodes
, but it fails with the following error:Upon investigating the cause, I discovered that the error is not correctly forwarded, which is why I can't see the real error message. This PR fixes that and forwards the catched errors.