File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -165,10 +165,19 @@ fn create_unknown_env(
165165 resolved_env : ResolvedPythonEnv ,
166166 fallback_category : Option < PythonEnvironmentKind > ,
167167) -> PythonEnvironment {
168- // Find all the python exes in the same bin directory.
168+ // Combine symlinks from resolved_env (which includes the original executable path
169+ // and the resolved path) with any additional symlinks found in the bin directory.
170+ // This is important on Windows where scoop and similar tools use shim executables
171+ // that redirect to the real Python installation.
172+ let mut symlinks = resolved_env. symlinks . clone ( ) . unwrap_or_default ( ) ;
173+ if let Some ( additional_symlinks) = find_symlinks ( & resolved_env. executable ) {
174+ symlinks. extend ( additional_symlinks) ;
175+ }
176+ symlinks. sort ( ) ;
177+ symlinks. dedup ( ) ;
169178
170179 PythonEnvironmentBuilder :: new ( fallback_category)
171- . symlinks ( find_symlinks ( & resolved_env . executable ) )
180+ . symlinks ( Some ( symlinks ) )
172181 . executable ( Some ( resolved_env. executable ) )
173182 . prefix ( Some ( resolved_env. prefix ) )
174183 . arch ( Some ( if resolved_env. is64_bit {
You can’t perform that action at this time.
0 commit comments