Add UV_NO_CACHE environment variable (#1383)

It's a little picky about the value, but that seems okay.

```
❯ ./target/debug/uv pip install trio
Audited 1 package in 4ms
❯ UV_NO_CACHE=true ./target/debug/uv pip install trio
Audited 1 package in 50ms
```

Closes #1382
This commit is contained in:
Zanie Blue 2024-02-15 17:34:42 -06:00 committed by GitHub
parent fbd6d87214
commit c6a43e92f9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -11,7 +11,13 @@ use crate::Cache;
#[derive(Parser, Debug, Clone)]
pub struct CacheArgs {
/// Avoid reading from or writing to the cache.
#[arg(global = true, long, short, alias = "no-cache-dir")]
#[arg(
global = true,
long,
short,
alias = "no-cache-dir",
env = "UV_NO_CACHE"
)]
no_cache: bool,
/// Path to the cache directory.