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

Warn if tool binary directory is not on path #4951

Merged
merged 1 commit into from
Jul 10, 2024
Merged

Warn if tool binary directory is not on path #4951

merged 1 commit into from
Jul 10, 2024

Conversation

charliermarsh
Copy link
Member

@charliermarsh charliermarsh commented Jul 10, 2024

Summary

Closes #4671.

Test Plan

❯ XDG_BIN_HOME="/Users/crmarsh/workspace/uv/foo bar" cargo run tool install black --force
Installed 2 executables: black, blackd
warning: `/Users/crmarsh/workspace/uv/foo bar` is not on your PATH. To use installed tools, run:
  export PATH="/Users/crmarsh/workspace/uv/foo bar:$PATH"

@charliermarsh charliermarsh added error messages Messaging when something goes wrong preview Experimental behavior labels Jul 10, 2024
.unwrap()
)),
Some(Shell::Csh) => Some(format!(
"setenv PATH \"{}:$PATH\"",
Copy link
Member Author

Choose a reason for hiding this comment

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

Obviously not all tested, some ChatGPT help here...

{
let export = match Shell::from_env() {
None => None,
Some(Shell::Nushell) => None,
Copy link
Member Author

Choose a reason for hiding this comment

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

Couldn't find a short invocation for this, it looks like you have to modify a file and source it.

@charliermarsh charliermarsh enabled auto-merge (squash) July 10, 2024 15:14
@charliermarsh charliermarsh merged commit 1fcc3c4 into main Jul 10, 2024
49 checks passed
@charliermarsh charliermarsh deleted the charlie/w branch July 10, 2024 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
error messages Messaging when something goes wrong preview Experimental behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

uv tool commands should warn if the executable directory isn't on the PATH
2 participants