Skip to content

Commit 80d311e

Browse files
committed
chore(windows): WinGet Links resolution uses ProgramFiles (machine-wide) after LOCALAPPDATA; drop ProgramData; update comment
1 parent fae347b commit 80d311e

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

UnityMcpBridge/Editor/Helpers/ServerInstaller.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,6 @@ internal static string FindUvPath()
278278
string localAppData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) ?? string.Empty;
279279
string programFiles = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) ?? string.Empty;
280280
string appData = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) ?? string.Empty;
281-
string programData = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) ?? string.Empty; // optional fallback
282281

283282
// Fast path: resolve from PATH first
284283
try
@@ -309,10 +308,8 @@ internal static string FindUvPath()
309308
candidates = new[]
310309
{
311310
// Preferred: WinGet Links shims (stable entrypoints)
312-
// Per-user shim, then machine-wide shim
311+
// Per-user shim (LOCALAPPDATA) → machine-wide shim (Program Files\WinGet\Links)
313312
Path.Combine(localAppData, "Microsoft", "WinGet", "Links", "uv.exe"),
314-
Path.Combine(programData, "Microsoft", "WinGet", "Links", "uv.exe"),
315-
// ProgramFiles Links is uncommon; keep as low-priority fallback
316313
Path.Combine(programFiles, "WinGet", "Links", "uv.exe"),
317314

318315
// Common per-user installs

0 commit comments

Comments
 (0)