-
Notifications
You must be signed in to change notification settings - Fork 569
Closed
Description
Description
In ServerManagementService.ClearUvxCache and ExecuteUvCommand, the code derives uv from uvx like this:
string uvxPath = MCPServiceLocator.Paths.GetUvxPath();
string uvCommand = uvxPath.Remove(uvxPath.Length - 1, 1);On Windows, when GetUvxPath() returns ...\uvx.exe, this becomes ...\uvx.ex, which is invalid and causes the cache clear command to fail.
Suggested Fix
Build the uv path using the file name and extension instead of removing the last character:
var dir = Path.GetDirectoryName(uvxPath);
var ext = Path.GetExtension(uvxPath); // ".exe" or ""
var uvPath = Path.Combine(dir ?? string.Empty, "uv" + ext);This works for both uvx and uvx.exe and avoids producing uvx.ex.
Environment
- OS: Windows
- Unity MCP package version: 8.1.5
Metadata
Metadata
Assignees
Labels
No labels