mirror of
https://github.com/Monadical-SAS/cubbi.git
synced 2025-12-20 20:29:06 +00:00
feat(ssh): make SSH server optional with --ssh flag
- Added --ssh flag to session create command - Modified mc-init.sh to check MC_SSH_ENABLED environment variable - SSH server is now disabled by default - Updated README.md with new flag example - Fixed UnboundLocalError with container_name in exception handler
This commit is contained in:
@@ -394,9 +394,16 @@ class ContainerManager:
|
|||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Warning: Failed to start MCP server '{mcp_name}': {e}")
|
print(f"Warning: Failed to start MCP server '{mcp_name}': {e}")
|
||||||
# Remove from the container names list if failed
|
# Get the container name before trying to remove it from the list
|
||||||
if container_name in mcp_container_names:
|
try:
|
||||||
mcp_container_names.remove(container_name)
|
container_name = self.mcp_manager.get_mcp_container_name(
|
||||||
|
mcp_name
|
||||||
|
)
|
||||||
|
if container_name in mcp_container_names:
|
||||||
|
mcp_container_names.remove(container_name)
|
||||||
|
except Exception:
|
||||||
|
# If we can't get the container name, just continue
|
||||||
|
pass
|
||||||
|
|
||||||
elif mcp_config.get("type") == "remote":
|
elif mcp_config.get("type") == "remote":
|
||||||
# For remote MCP, just set environment variables
|
# For remote MCP, just set environment variables
|
||||||
|
|||||||
Reference in New Issue
Block a user