Skip to content

fix: return failure when uninstall fails - #355

Draft
dajiaohuang wants to merge 1 commit into
xtool-org:mainfrom
dajiaohuang:repostew/issue-354-uninstall-exit-code
Draft

dajiaohuang wants to merge 1 commit into
xtool-org:mainfrom
dajiaohuang:repostew/issue-354-uninstall-exit-code

Conversation

@dajiaohuang

Copy link
Copy Markdown

What does this PR do?

Fixes #354. When InstallationProxyClient.uninstall throws, xtool uninstall now returns a nonzero process exit code instead of returning normally with status 0. This matches the failure behavior of the install and development commands, so scripts can distinguish a failed uninstall.

How was it tested?

  • git diff --check passed.
  • Not run: swift build, swift test, and make lint; this environment has no Swift or Make executable. No runtime/device reproduction was possible here.

AI tool usage

  • 0 - No AI was used to write code
  • 1 - I was assisted by AI. I reviewed the finished result.
  • 2 - I set the AI going and left it to it; nobody has read the result - no review, or AI review only

@coderabbitai

coderabbitai Bot commented Oct 15, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

} catch {
print("Failed: \(error)")
return
throw ExitCode.failure

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or how about we just drop the catch block entirely?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

xtool uninstall exits 0 when the uninstall fails

2 participants