From 35adca345cad49c8ccc44a33668910b7953f47b6 Mon Sep 17 00:00:00 2001 From: Max Novich Date: Wed, 9 Jul 2025 14:02:52 -0700 Subject: [PATCH] fix the npx.cmd mapping issue (#3324) No rust changes so safe to override --- ui/desktop/src/utils/binaryPath.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ui/desktop/src/utils/binaryPath.ts b/ui/desktop/src/utils/binaryPath.ts index ee906ae0..e7de4342 100644 --- a/ui/desktop/src/utils/binaryPath.ts +++ b/ui/desktop/src/utils/binaryPath.ts @@ -29,8 +29,16 @@ export const getBinaryPath = (app: Electron.App, binaryName: string): string => if (binaryName === 'goosed') { return path.join(process.resourcesPath, 'bin', 'goosed.exe'); } - // For other binaries (uvx, npx), rely on PATH we just patched - return binaryName; + + // Map binary names to their Windows equivalents + const windowsBinaryMap: Record = { + npx: 'npx.cmd', + uvx: 'uvx.exe', + }; + + // For other binaries, use Windows-specific extensions if available + const windowsBinary = windowsBinaryMap[binaryName] || binaryName; + return windowsBinary; } // For non-Windows platforms, use the original logic