mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-16 17:55:01 +00:00
Add debug logs for version file search (#12951)
Co-authored-by: John Mumm <jtfmumm@gmail.com>
This commit is contained in:
parent
91410acf82
commit
41ac6649d7
2 changed files with 21 additions and 1 deletions
|
@ -69,7 +69,26 @@ impl PythonVersionFile {
|
|||
working_directory: impl AsRef<Path>,
|
||||
options: &DiscoveryOptions<'_>,
|
||||
) -> Result<Option<Self>, std::io::Error> {
|
||||
let Some(path) = Self::find_nearest(working_directory, options) else {
|
||||
let Some(path) = Self::find_nearest(&working_directory, options) else {
|
||||
if let Some(stop_discovery_at) = options.stop_discovery_at {
|
||||
if stop_discovery_at == working_directory.as_ref() {
|
||||
debug!(
|
||||
"No Python version file found in workspace: {}",
|
||||
working_directory.as_ref().display()
|
||||
);
|
||||
} else {
|
||||
debug!(
|
||||
"No Python version file found between working directory `{}` and workspace root `{}`",
|
||||
working_directory.as_ref().display(),
|
||||
stop_discovery_at.display()
|
||||
);
|
||||
}
|
||||
} else {
|
||||
debug!(
|
||||
"No Python version file found in ancestors of working directory: {}",
|
||||
working_directory.as_ref().display()
|
||||
);
|
||||
}
|
||||
// Not found in directory or its ancestors. Looking in user-level config.
|
||||
return Ok(match user_uv_config_dir() {
|
||||
Some(user_dir) => Self::discover_user_config(user_dir, options)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue