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

Add tool dir and toolchain dir commands #4695

Merged
merged 4 commits into from
Jul 1, 2024

Conversation

blueraft
Copy link
Contributor

@blueraft blueraft commented Jul 1, 2024

Summary

Resolves #4483
Resolves #4484

Test Plan

cargo test

❯ cargo run -- toolchain dir
warning: `uv toolchain dir` is experimental and may change without warning.
/Users/ahmedilyas/Library/Application Support/uv/toolchains

❯ cargo run -- tool dir
warning: `uv tool dir` is experimental and may change without warning.
/Users/ahmedilyas/Library/Application Support/uv/tools

Copy link
Member

@charliermarsh charliermarsh left a comment

Choose a reason for hiding this comment

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

Thank you! That's perfect.

@charliermarsh charliermarsh added cli Related to the command line interface preview Experimental behavior labels Jul 1, 2024
@charliermarsh charliermarsh enabled auto-merge (squash) July 1, 2024 13:49
@charliermarsh charliermarsh changed the title Add tool dir and toolchain dir cmds Add tool dir and toolchain dir commands Jul 1, 2024
@blueraft
Copy link
Contributor Author

blueraft commented Jul 1, 2024

Uh tests failed I'll check 🤔

@charliermarsh
Copy link
Member

It looks like something frustrating with the filters. Maybe try running without context.filters() to see what's happening?

@blueraft
Copy link
Contributor Author

blueraft commented Jul 1, 2024

It's an issue with path.user_display() function stripping off the temp dir path, what do you think of using path.simplified_display() function here instead? The test passes on both MacOS and Ubuntu then (haven't tested on Windows yet).

auto-merge was automatically disabled July 1, 2024 14:41

Head branch was pushed to by a user without write access

@charliermarsh
Copy link
Member

That seems ok to me... user_display just truncates if it's relative, which is rare for these cases (and probably not desired anyway).

@charliermarsh
Copy link
Member

Can you change cache dir as well for consistency?

@blueraft
Copy link
Contributor Author

blueraft commented Jul 1, 2024

Done

@charliermarsh charliermarsh enabled auto-merge (squash) July 1, 2024 14:51
@charliermarsh charliermarsh merged commit 081f092 into astral-sh:main Jul 1, 2024
47 checks passed
@blueraft blueraft deleted the dir-tool-toolchain branch July 1, 2024 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Related to the command line interface preview Experimental behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add uv tool dir Add uv toolchain dir
2 participants