@@ -270,19 +270,29 @@ internal static string FindUvPath()
270270 string [ ] candidates ;
271271 if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Windows ) )
272272 {
273+ string localAppData = Environment . GetFolderPath ( Environment . SpecialFolder . LocalApplicationData ) ?? string . Empty ;
274+ string programFiles = Environment . GetFolderPath ( Environment . SpecialFolder . ProgramFiles ) ?? string . Empty ;
275+ string appData = Environment . GetFolderPath ( Environment . SpecialFolder . ApplicationData ) ?? string . Empty ;
276+
273277 candidates = new [ ]
274278 {
279+ // Preferred: WinGet Links shims (stable entrypoints)
280+ Path . Combine ( localAppData , "Microsoft" , "WinGet" , "Links" , "uv.exe" ) ,
281+ Path . Combine ( programFiles , "WinGet" , "Links" , "uv.exe" ) ,
282+
275283 // Common per-user installs
276- Path . Combine ( Environment . GetFolderPath ( Environment . SpecialFolder . LocalApplicationData ) ?? string . Empty , @"Programs\Python\Python313\Scripts\uv.exe" ) ,
277- Path . Combine ( Environment . GetFolderPath ( Environment . SpecialFolder . LocalApplicationData ) ?? string . Empty , @"Programs\Python\Python312\Scripts\uv.exe" ) ,
278- Path . Combine ( Environment . GetFolderPath ( Environment . SpecialFolder . LocalApplicationData ) ?? string . Empty , @"Programs\Python\Python311\Scripts\uv.exe" ) ,
279- Path . Combine ( Environment . GetFolderPath ( Environment . SpecialFolder . LocalApplicationData ) ?? string . Empty , @"Programs\Python\Python310\Scripts\uv.exe" ) ,
280- Path . Combine ( Environment . GetFolderPath ( Environment . SpecialFolder . ApplicationData ) ?? string . Empty , @"Python\Python313\Scripts\uv.exe" ) ,
281- Path . Combine ( Environment . GetFolderPath ( Environment . SpecialFolder . ApplicationData ) ?? string . Empty , @"Python\Python312\Scripts\uv.exe" ) ,
282- Path . Combine ( Environment . GetFolderPath ( Environment . SpecialFolder . ApplicationData ) ?? string . Empty , @"Python\Python311\Scripts\uv.exe" ) ,
283- Path . Combine ( Environment . GetFolderPath ( Environment . SpecialFolder . ApplicationData ) ?? string . Empty , @"Python\Python310\Scripts\uv.exe" ) ,
284+ Path . Combine ( localAppData , @"Programs\Python\Python313\Scripts\uv.exe" ) ,
285+ Path . Combine ( localAppData , @"Programs\Python\Python312\Scripts\uv.exe" ) ,
286+ Path . Combine ( localAppData , @"Programs\Python\Python311\Scripts\uv.exe" ) ,
287+ Path . Combine ( localAppData , @"Programs\Python\Python310\Scripts\uv.exe" ) ,
288+ Path . Combine ( appData , @"Python\Python313\Scripts\uv.exe" ) ,
289+ Path . Combine ( appData , @"Python\Python312\Scripts\uv.exe" ) ,
290+ Path . Combine ( appData , @"Python\Python311\Scripts\uv.exe" ) ,
291+ Path . Combine ( appData , @"Python\Python310\Scripts\uv.exe" ) ,
292+
284293 // Program Files style installs (if a native installer was used)
285- Path . Combine ( Environment . GetFolderPath ( Environment . SpecialFolder . ProgramFiles ) ?? string . Empty , @"uv\uv.exe" ) ,
294+ Path . Combine ( programFiles , @"uv\uv.exe" ) ,
295+
286296 // Try simple name resolution later via PATH
287297 "uv.exe" ,
288298 "uv"
0 commit comments