@@ -15,6 +15,7 @@ use pet_core::{
1515 Configuration , Locator , LocatorKind , RefreshStatePersistence ,
1616} ;
1717use pet_fs:: path:: norm_case;
18+ use pet_fs:: path:: resolve_dot_venv;
1819use pet_python_utils:: executable:: { find_executable, find_executables} ;
1920use serde:: Deserialize ;
2021
@@ -422,7 +423,7 @@ fn find_workspace_for_project(project_path: &Path) -> Option<PythonEnvironment>
422423/// Builds a `PythonEnvironment` for a uv workspace root if it has a `.venv` with a valid
423424/// uv-managed pyvenv.cfg.
424425fn build_workspace_env ( workspace_root : & Path ) -> Option < PythonEnvironment > {
425- let prefix = resolve_dot_env ( workspace_root) ;
426+ let prefix = resolve_dot_venv ( workspace_root) ;
426427 let pyvenv_cfg = prefix. join ( "pyvenv.cfg" ) ;
427428 if !pyvenv_cfg. exists ( ) {
428429 trace ! (
@@ -465,8 +466,8 @@ fn list_envs_in_directory(path: &Path) -> Vec<PythonEnvironment> {
465466 let Some ( pyproject) = pyproject else {
466467 return envs;
467468 } ;
468- let pyvenv_cfg = resolve_dot_env ( path) . join ( "pyvenv.cfg" ) ;
469- let prefix = resolve_dot_env ( path) ;
469+ let pyvenv_cfg = resolve_dot_venv ( path) . join ( "pyvenv.cfg" ) ;
470+ let prefix = resolve_dot_venv ( path) ;
470471 let unix_executable = prefix. join ( "bin/python" ) ;
471472 let windows_executable = prefix. join ( "Scripts/python.exe" ) ;
472473 let executable = if unix_executable. exists ( ) {
0 commit comments