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

docs: Use proper environment variables for Windows #6433

Merged
merged 4 commits into from
Aug 23, 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 crates/uv-cache/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub struct CacheArgs {
/// Path to the cache directory.
///
/// Defaults to `$HOME/Library/Caches/uv` on macOS, `$XDG_CACHE_HOME/uv` or `$HOME/.cache/uv` on
/// Linux, and `{FOLDERID_LocalAppData}\uv\cache` on Windows.
/// Linux, and `%LOCALAPPDATA%\uv\cache` on Windows.
#[arg(global = true, long, env = "UV_CACHE_DIR")]
pub cache_dir: Option<PathBuf>,
}
Expand Down
6 changes: 3 additions & 3 deletions crates/uv-cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ pub enum CacheCommand {
///
///
/// By default, the cache is stored in `$XDG_CACHE_HOME/uv` or `$HOME/.cache/uv` on Unix and
/// `{FOLDERID_LocalAppData}\uv\cache` on Windows.
Copy link
Member

Choose a reason for hiding this comment

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

Would be you be willing to update all of the FOLDERID_ references? I think there are some more.

You'll need to update the generated reference with cargo dev generate-all

/// `%LOCALAPPDATA%\uv\cache` on Windows.
///
/// When `--no-cache` is used, the cache is stored in a temporary directory and discarded when
/// the process exits.
Expand Down Expand Up @@ -2731,7 +2731,7 @@ pub enum ToolCommand {
/// The tools directory is used to store environments and metadata for installed tools.
///
/// By default, tools are stored in the uv data directory at `$XDG_DATA_HOME/uv/tools` or
/// `$HOME/.local/share/uv/tools` on Unix and `{FOLDERID_RoamingAppData}\uv\data\tools` on
/// `$HOME/.local/share/uv/tools` on Unix and `%APPDATA%\uv\data\tools` on
/// Windows.
///
/// The tool installation directory may be overridden with `$UV_TOOL_DIR`.
Expand Down Expand Up @@ -2970,7 +2970,7 @@ pub enum PythonCommand {
///
/// By default, Python installations are stored in the uv data directory at
/// `$XDG_DATA_HOME/uv/python` or `$HOME/.local/share/uv/python` on Unix and
/// `{FOLDERID_RoamingAppData}\uv\data\python` on Windows.
/// `%APPDATA%\uv\data\python` on Windows.
///
/// The Python installation directory may be overridden with `$UV_PYTHON_INSTALL_DIR`.
Dir,
Expand Down
2 changes: 1 addition & 1 deletion crates/uv-settings/src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ pub struct GlobalOptions {
/// Path to the cache directory.
///
/// Defaults to `$HOME/Library/Caches/uv` on macOS, `$XDG_CACHE_HOME/uv` or `$HOME/.cache/uv` on
/// Linux, and `{FOLDERID_LocalAppData}\uv\cache` on Windows.
/// Linux, and `%LOCALAPPDATA%\uv\cache` on Windows.
#[option(
default = "None",
value_type = "str",
Expand Down
4 changes: 2 additions & 2 deletions crates/uv/tests/help.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ fn help_subcommand() {
Path to the cache directory.

Defaults to `$HOME/Library/Caches/uv` on macOS, `$XDG_CACHE_HOME/uv` or `$HOME/.cache/uv`
on Linux, and `{FOLDERID_LocalAppData}/uv/cache` on Windows.
on Linux, and `%LOCALAPPDATA%/uv/cache` on Windows.

[env: UV_CACHE_DIR=]

Expand Down Expand Up @@ -414,7 +414,7 @@ fn help_subsubcommand() {
Path to the cache directory.

Defaults to `$HOME/Library/Caches/uv` on macOS, `$XDG_CACHE_HOME/uv` or `$HOME/.cache/uv`
on Linux, and `{FOLDERID_LocalAppData}/uv/cache` on Windows.
on Linux, and `%LOCALAPPDATA%/uv/cache` on Windows.

[env: UV_CACHE_DIR=]

Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ uv determines the cache directory according to, in order:
2. The specific cache directory specified via `--cache-dir`, `UV_CACHE_DIR`, or
[`tool.uv.cache-dir`](../reference/settings.md#cache-dir).
3. A system-appropriate cache directory, e.g., `$XDG_CACHE_HOME/uv` or `$HOME/.cache/uv` on Unix and
`{FOLDERID_LocalAppData}\uv\cache` on Windows
`%LOCALAPPDATA%\uv\cache` on Windows

!!! note

Expand Down
76 changes: 38 additions & 38 deletions docs/reference/cli.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Path to the cache directory.

Defaults to `$HOME/Library/Caches/uv` on macOS, `$XDG_CACHE_HOME/uv` or `$HOME/.cache/uv` on
Linux, and `{FOLDERID_LocalAppData}\uv\cache` on Windows.
Linux, and `%LOCALAPPDATA%\uv\cache` on Windows.

**Default value**: `None`

Expand Down
2 changes: 1 addition & 1 deletion uv.schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading