mirror of
https://github.com/SuperClaude-Org/SuperClaude_Framework.git
synced 2025-12-29 16:16:08 +00:00
Fixes and improvement (#393)
* The -i flag has been removed from the `_run_command_cross_platform` function in `setup/components/mcp.py`. * fix: Prevent installer from hanging during MCP installation The SuperClaude installer was hanging during the installation of MCP components on non-Windows systems. This was caused by the use of an interactive shell (`-i`) when executing the `claude mcp add` command. The interactive shell would attempt to read from standard input, causing the process to be suspended by the shell. This commit fixes the issue by removing the `-i` flag from the `_run_command_cross_platform` function in `setup/components/mcp.py`. This ensures that the installation process runs non-interactively and completes without hanging. * fix: Add 'cmd /c' for Windows and refactor shell execution This commit resolves an issue with `npx` command execution on Windows by prepending `cmd /c` to the command. It also refactors the shell command execution for non-Windows systems to use the `executable` argument in `subprocess.run` for a cleaner and more robust implementation. * fix: Add 'cmd /c' for Windows and refactor shell execution This commit resolves an issue with `npx` command execution on Windows by prepending `cmd /c` to the command. It also refactors the shell command execution for non-Windows systems to use the `executable` argument in `subprocess.run` for a cleaner and more robust implementation. * docs: Update Chrome DevTools MCP documentation This commit updates the documentation for the Chrome DevTools MCP server to be more comprehensive and consistent with the existing documentation structure. The file `SuperClaude/MCP/MCP_Chrome-DevTools.md` has been updated with detailed information about the server's purpose, triggers, and usage examples. * docs: Update documentation for Chrome DevTools MCP This commit updates the main README.md and the MCP servers user guide to include information about the new Chrome DevTools MCP server. The documentation has been updated to reflect the new server count and provide details about the new server's functionality. ---------
This commit is contained in:
@@ -76,6 +76,13 @@ class MCPComponent(Component):
|
||||
"required": False,
|
||||
"api_key_env": "TAVILY_API_KEY",
|
||||
"api_key_description": "Tavily API key for web search (get from https://app.tavily.com)"
|
||||
},
|
||||
"chrome-devtools": {
|
||||
"name": "chrome-devtools",
|
||||
"description": "Chrome DevTools debugging and performance analysis",
|
||||
"install_method": "npm",
|
||||
"install_command": "npx -y chrome-devtools-mcp@latest",
|
||||
"required": False
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,18 +111,16 @@ class MCPComponent(Component):
|
||||
CompletedProcess result
|
||||
"""
|
||||
if platform.system() == "Windows":
|
||||
# Windows: Use list format with shell=True
|
||||
return subprocess.run(cmd, shell=True, **kwargs)
|
||||
# On Windows, wrap command in 'cmd /c' to properly handle commands like npx
|
||||
cmd = ["cmd", "/c"] + cmd
|
||||
return subprocess.run(cmd, **kwargs)
|
||||
else:
|
||||
# macOS/Linux: Use string format with proper shell to support aliases
|
||||
cmd_str = " ".join(shlex.quote(str(arg)) for arg in cmd)
|
||||
|
||||
# Use the user's shell with interactive mode to load aliases
|
||||
# Use the user's shell to execute the command, supporting aliases
|
||||
user_shell = os.environ.get('SHELL', '/bin/bash')
|
||||
|
||||
# Execute command with user's shell in interactive mode to load aliases
|
||||
full_cmd = f"{user_shell} -i -c {shlex.quote(cmd_str)}"
|
||||
return subprocess.run(full_cmd, shell=True, env=os.environ, **kwargs)
|
||||
return subprocess.run(cmd_str, shell=True, env=os.environ, executable=user_shell, **kwargs)
|
||||
|
||||
def validate_prerequisites(self, installSubPath: Optional[Path] = None) -> Tuple[bool, List[str]]:
|
||||
"""Check prerequisites"""
|
||||
|
||||
Reference in New Issue
Block a user