Skip to content

Commit 8be4561

Browse files
author
Hyungu Cho
committed
fix: cannot install MCP Servers when running "SuperGemini install".
1 parent b8f54a0 commit 8be4561

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

Docs/Reference/diagnostic-reference.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ def time_operation(command, description):
580580
"""Time a shell command and return duration"""
581581
start_time = time.time()
582582
try:
583-
result = subprocess.run(command, shell=True, capture_output=True, text=True, timeout=30)
583+
result = subprocess.run(command, shell=(sys.platform == "win32"), capture_output=True, text=True, timeout=30)
584584
end_time = time.time()
585585
duration = end_time - start_time
586586
success = result.returncode == 0
@@ -1011,4 +1011,4 @@ EOF
10111011

10121012
**Diagnostic Philosophy**: Approach problems systematically - start with basic verification, isolate components, test hypotheses, and apply targeted solutions. Document findings for future reference and community benefit.
10131013

1014-
**Emergency Contact**: For critical system failures, use the complete recovery protocol above. If issues persist after recovery, document the full diagnostic output and seek community support through GitHub issues.
1014+
**Emergency Contact**: For critical system failures, use the complete recovery protocol above. If issues persist after recovery, document the full diagnostic output and seek community support through GitHub issues.

setup/components/mcp.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ def _install_npm_package(self, server_key: str, server_info: Dict[str, Any]) ->
340340
capture_output=True,
341341
text=True,
342342
timeout=180,
343-
shell=True
343+
shell=(sys.platform == "win32")
344344
)
345345

346346
if result.returncode == 0:
@@ -373,7 +373,7 @@ def _install_uv_package(self, server_key: str, server_info: Dict[str, Any]) -> b
373373
capture_output=True,
374374
text=True,
375375
timeout=300,
376-
shell=True
376+
shell=(sys.platform == "win32")
377377
)
378378

379379
if result.returncode == 0:
@@ -411,7 +411,7 @@ def _verify_npm_installation(self, server_key: str, server_info: Dict[str, Any])
411411
capture_output=True,
412412
text=True,
413413
timeout=30,
414-
shell=True
414+
shell=(sys.platform == "win32")
415415
)
416416

417417
if result.returncode == 0:
@@ -434,7 +434,7 @@ def _verify_uv_installation(self, server_key: str, server_info: Dict[str, Any])
434434
capture_output=True,
435435
text=True,
436436
timeout=30,
437-
shell=True
437+
shell=(sys.platform == "win32")
438438
)
439439

440440
if result.returncode == 0 and ("serena" in result.stdout or "serena-agent" in result.stdout):
@@ -454,7 +454,7 @@ def _validate_prerequisites(self) -> Tuple[bool, List[str]]:
454454

455455
# Check Node.js version (>=18 required for MCP)
456456
try:
457-
result = subprocess.run(["node", "--version"], capture_output=True, text=True, timeout=10, shell=True)
457+
result = subprocess.run(["node", "--version"], capture_output=True, text=True, timeout=10, shell=(sys.platform == "win32"))
458458
if result.returncode == 0:
459459
version = result.stdout.strip().lstrip('v')
460460
major_version = int(version.split('.')[0])
@@ -469,7 +469,7 @@ def _validate_prerequisites(self) -> Tuple[bool, List[str]]:
469469

470470
# Check npm availability
471471
try:
472-
result = subprocess.run(["npm", "--version"], capture_output=True, text=True, timeout=10, shell=True)
472+
result = subprocess.run(["npm", "--version"], capture_output=True, text=True, timeout=10, shell=(sys.platform == "win32"))
473473
if result.returncode != 0:
474474
errors.append("npm not working properly")
475475
else:
@@ -479,7 +479,7 @@ def _validate_prerequisites(self) -> Tuple[bool, List[str]]:
479479

480480
# Check uv availability (for Python-based MCP servers like Serena)
481481
try:
482-
result = subprocess.run(["uv", "--version"], capture_output=True, text=True, timeout=10, shell=True)
482+
result = subprocess.run(["uv", "--version"], capture_output=True, text=True, timeout=10, shell=(sys.platform == "win32"))
483483
if result.returncode == 0:
484484
self.logger.debug(f"uv {result.stdout.strip()} OK")
485485
else:
@@ -756,4 +756,4 @@ def get_dependencies(self) -> List[str]:
756756

757757
def get_size_estimate(self) -> int:
758758
"""Get estimated size - minimal since we only modify config"""
759-
return 4096 # 4KB - just config modifications
759+
return 4096 # 4KB - just config modifications

0 commit comments

Comments
 (0)