From ecf332c24c5ca5f8bef4a990f0ba101511de2093 Mon Sep 17 00:00:00 2001 From: Max Novich Date: Wed, 9 Jul 2025 13:38:50 -0700 Subject: [PATCH] fix the npx.cmd mapping issue --- 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 ee906ae0501d..e7de43426426 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