Skip to content

Added Self Uninstall Command#944

Merged
haixuanTao merged 3 commits intodora-rs:mainfrom
Shar-jeel-Sajid:self-uninstall
Apr 22, 2025
Merged

Added Self Uninstall Command#944
haixuanTao merged 3 commits intodora-rs:mainfrom
Shar-jeel-Sajid:self-uninstall

Conversation

@Shar-jeel-Sajid
Copy link
Copy Markdown
Contributor

This PR adds the sub-command uninstall under the self command. It also adds the missing discription of the Self command. I have used self-replace crate for this purpose.

@haixuanTao
Copy link
Copy Markdown
Collaborator

Does this also work with pip installed version?

@Shar-jeel-Sajid
Copy link
Copy Markdown
Contributor Author

The self_replace will delete the currently running executable so in case we are using the pip installed version it may delete the python interpreter. In this case one approach could be that if we are using the pip installed version we will not uninstall dora but print a message saying that uninstalling can be unsafe must run the command pip uninstall dora-rs-cli. If you have any other approaches you may suggest it.

@haixuanTao
Copy link
Copy Markdown
Collaborator

So the cli can detect if it was installed using python with the python feature flag. Could you check if you can call either uv pip uninstall dora-rs-cli or pip install dora-rs-cli if the feature flag is set.

See: #940

@Shar-jeel-Sajid
Copy link
Copy Markdown
Contributor Author

Shar-jeel-Sajid commented Apr 16, 2025

We can use pip uninstall dora-rs-cli it will uninstall for both pip and uv pip. So i called pip uninstall dora-rs-cli in case the feature flag was set.

@haixuanTao
Copy link
Copy Markdown
Collaborator

FYI, the CI/CD error has been fixed on main. You can skip it

@Shar-jeel-Sajid
Copy link
Copy Markdown
Contributor Author

Should i rebase with main?

@haixuanTao
Copy link
Copy Markdown
Collaborator

No it's ok

@haixuanTao haixuanTao merged commit 2dd21c6 into dora-rs:main Apr 22, 2025
158 of 164 checks passed
@haixuanTao
Copy link
Copy Markdown
Collaborator

I would be very grateful if we could create an additional PR the update cli command as I don't think it works with python installation.

@Shar-jeel-Sajid
Copy link
Copy Markdown
Contributor Author

I will look into that.

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.

2 participants