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

Use XDG (i.e. ~/.local/bin) instead of the Cargo home directory in the installer #8420

Merged
merged 1 commit into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -331,4 +331,4 @@ github-custom-job-permissions = { "build-docker" = { packages = "write", content
# Whether to install an updater program
install-updater = false
# Path that installers should place binaries in
install-path = "CARGO_HOME"
install-path = ["$XDG_BIN_HOME/", "$XDG_DATA_HOME/../bin", "~/.local/bin"]
Copy link
Member

Choose a reason for hiding this comment

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

Are these checked in order?

Copy link
Member

Choose a reason for hiding this comment

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

10 changes: 5 additions & 5 deletions docs/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ Request a specific version by including it in the URL:

#### Configuring installation

By default, uv is installed to `~/.cargo/bin`. To change the installation path, use
`UV_INSTALL_DIR`:
By default, uv is installed to `~/.local/bin`. uv's installer also respects the `XDG_BIN_HOME`
environment variable. To use a custom installation path, use `UV_INSTALL_DIR`:

=== "macOS and Linux"

Expand Down Expand Up @@ -222,14 +222,14 @@ If you need to remove uv from your system, just remove the `uv` and `uvx` binari
=== "macOS and Linux"

```console
$ rm ~/.cargo/bin/uv ~/.cargo/bin/uvx
$ rm ~/.local/bin/uv ~/.local/bin/uvx
```

=== "Windows"

```powershell
$ rm $HOME\.cargo\bin\uv.exe
$ rm $HOME\.cargo\bin\uvx.exe
$ rm $HOME\.local\bin\uv.exe
$ rm $HOME\.local\bin\uvx.exe
```

!!! tip
Expand Down
Loading