mirror of
https://github.com/astral-sh/uv.git
synced 2025-10-29 03:02:55 +00:00
Warn on invalid uv.toml when provided via direct path (#14653)
## Summary We validate the `uv.toml` when it's discovered automatically, but not when provided via `--config-file`. The same limitations exist, though -- I think the lack of enforcement is just an oversight. Closes https://github.com/astral-sh/uv/issues/14650.
This commit is contained in:
parent
861f7a1c42
commit
03de6c36e3
2 changed files with 31 additions and 2 deletions
|
|
@ -170,7 +170,12 @@ impl FilesystemOptions {
|
|||
|
||||
/// Load a [`FilesystemOptions`] from a `uv.toml` file.
|
||||
pub fn from_file(path: impl AsRef<Path>) -> Result<Self, Error> {
|
||||
Ok(Self(read_file(path.as_ref())?))
|
||||
let path = path.as_ref();
|
||||
tracing::debug!("Reading user configuration from: `{}`", path.display());
|
||||
|
||||
let options = read_file(path)?;
|
||||
validate_uv_toml(path, &options)?;
|
||||
Ok(Self(options))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue