mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 19:08:04 +00:00
Support .env
files in uv tool run
(#12386)
## Summary Closes https://github.com/astral-sh/uv/issues/12371.
This commit is contained in:
parent
42a87da857
commit
2b3d6fd7b6
6 changed files with 161 additions and 0 deletions
|
@ -4093,6 +4093,17 @@ pub struct ToolRunArgs {
|
|||
#[arg(long)]
|
||||
pub isolated: bool,
|
||||
|
||||
/// Load environment variables from a `.env` file.
|
||||
///
|
||||
/// Can be provided multiple times, with subsequent files overriding values defined in previous
|
||||
/// files.
|
||||
#[arg(long, value_delimiter = ' ', env = EnvVars::UV_ENV_FILE)]
|
||||
pub env_file: Vec<PathBuf>,
|
||||
|
||||
/// Avoid reading environment variables from a `.env` file.
|
||||
#[arg(long, value_parser = clap::builder::BoolishValueParser::new(), env = EnvVars::UV_NO_ENV_FILE)]
|
||||
pub no_env_file: bool,
|
||||
|
||||
#[command(flatten)]
|
||||
pub installer: ResolverInstallerArgs,
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue