Allow customizing the tool install directory with UV_TOOL_BIN_DIR (#6207)

Requested in #6067
This commit is contained in:
Zanie Blue 2024-08-19 10:02:10 -05:00 committed by GitHub
parent 310412a2ff
commit 6bc8639ce8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 62 additions and 2 deletions

View file

@ -2842,7 +2842,15 @@ pub struct ToolDirArgs {
///
/// By default, `uv tool dir` shows the directory into which the tool Python environments
/// themselves are installed, rather than the directory containing the linked executables.
#[arg(long)]
///
/// The tool executable directory is determined according to the XDG standard and is derived
/// from the following environment variables, in order of preference:
///
/// - `$UV_TOOL_BIN_DIR`
/// - `$XDG_BIN_HOME`
/// - `$XDG_DATA_HOME/../bin`
/// - `$HOME/.local/bin`
#[arg(long, verbatim_doc_comment)]
pub bin: bool,
}