Skip to content

Commit 303f37a

Browse files
committed
Use XDG (i.e. ~/.local/bin) instead of the Cargo home directory in the installer
1 parent 1b77055 commit 303f37a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,4 +329,4 @@ github-custom-job-permissions = { "build-docker" = { packages = "write", content
329329
# Whether to install an updater program
330330
install-updater = false
331331
# Path that installers should place binaries in
332-
install-path = "CARGO_HOME"
332+
install-path = ["$XDG_BIN_HOME/", "$XDG_DATA_HOME/../bin", "~/.local/bin"]

docs/getting-started/installation.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ Request a specific version by including it in the URL:
5454

5555
#### Configuring installation
5656

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

6060
=== "macOS and Linux"
6161

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

224224
```console
225-
$ rm ~/.cargo/bin/uv ~/.cargo/bin/uvx
225+
$ rm ~/.local/bin/uv ~/.local/bin/uvx
226226
```
227227

228228
=== "Windows"
229229

230230
```powershell
231-
$ rm $HOME\.cargo\bin\uv.exe
232-
$ rm $HOME\.cargo\bin\uvx.exe
231+
$ rm $HOME\.local\bin\uv.exe
232+
$ rm $HOME\.local\bin\uvx.exe
233233
```
234234

235235
!!! tip

0 commit comments

Comments
 (0)