Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Editor/Utils/McpUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,11 @@ public static void RunNpmCommand(string arguments, string workingDirectory)
// Fallback to /bin/bash to find 'npm' in PATH
startInfo.FileName = "/bin/bash";
startInfo.Arguments = $"-c \"npm {arguments}\"";

// Ensure PATH includes common npm locations and current PATH
string currentPath = Environment.GetEnvironmentVariable("PATH") ?? string.Empty;
string extraPaths = "/usr/local/bin:/opt/homebrew/bin";
startInfo.EnvironmentVariables["PATH"] = $"{extraPaths}:{currentPath}";
}

try
Expand Down