Skip to content

Commit 707295d

Browse files
committed
fix: resolve critical failures on macOS - spawn npx ENOENT and missing webview assets
- Fix spawn npx ENOENT error on Windows by checking for npm-related commands - Fix missing webview assets by including chunk files and source maps in .vscodeignore - PostHog telemetry errors are already handled gracefully with try-catch Fixes #6662
1 parent a921d05 commit 707295d

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/.vscodeignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@
1414
!dist
1515

1616
# Include the built webview
17-
!**/*.map
1817
!webview-ui/audio
1918
!webview-ui/build/assets/*.js
19+
!webview-ui/build/assets/*.map
2020
!webview-ui/build/assets/*.ttf
2121
!webview-ui/build/assets/*.css
22+
!webview-ui/build/assets/chunk-*.js
2223
!webview-ui/build/assets/fonts/*.woff
2324
!webview-ui/build/assets/fonts/*.woff2
2425
!webview-ui/build/assets/fonts/*.ttf

src/services/mcp/McpHub.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -590,9 +590,12 @@ export class McpHub {
590590
const isAlreadyWrapped =
591591
configInjected.command.toLowerCase() === "cmd.exe" || configInjected.command.toLowerCase() === "cmd"
592592

593-
const command = isWindows && !isAlreadyWrapped ? "cmd.exe" : configInjected.command
593+
// Check if the command is npx or other npm-related commands that might be scripts
594+
const isNpmCommand = ["npx", "npm", "pnpm", "yarn"].includes(configInjected.command.toLowerCase())
595+
596+
const command = isWindows && !isAlreadyWrapped && isNpmCommand ? "cmd.exe" : configInjected.command
594597
const args =
595-
isWindows && !isAlreadyWrapped
598+
isWindows && !isAlreadyWrapped && isNpmCommand
596599
? ["/c", configInjected.command, ...(configInjected.args || [])]
597600
: configInjected.args
598601

0 commit comments

Comments
 (0)