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

Exit with zero when uv tool install request is already satisfied #4986

Merged
merged 2 commits into from
Jul 12, 2024

Conversation

billy-doyle
Copy link
Contributor

Summary

uv tool install X fails for tools already installed and exits with code 1. Allow already installed tools to exit with code 0.

Test Plan

@zanieb
Copy link
Member

zanieb commented Jul 11, 2024

In theory, there will be a test snapshot that will fail because of this change in tool_install.rs

@billy-doyle
Copy link
Contributor Author

@zanieb modified the tests

tested locally with cargo test tool_install. Are these "success: true exit_code: 0 ----- stdout ----- ..." autogenerated? I modified by hand but i did see in CONTRIBUTING.md cargo dev generate-json-schema although it did not fix anything there

@zanieb
Copy link
Member

zanieb commented Jul 11, 2024

@billy-doyle usually you'd do cargo install cargo-insta and cargo insta test -- <test-name>. I'm not sure why we don't cover that in the contributing guide! We ought to add it.

@zanieb zanieb changed the title feat/uv-tool-exit-0 Exit with zero when uv tool install request is already satisfied Jul 11, 2024
@charliermarsh charliermarsh merged commit 22cca77 into astral-sh:main Jul 12, 2024
49 checks passed
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.

3 participants