diff --git a/actions/setup/sh/start_mcp_gateway.sh b/actions/setup/sh/start_mcp_gateway.sh index d65159e5850..a68b48bbd3c 100755 --- a/actions/setup/sh/start_mcp_gateway.sh +++ b/actions/setup/sh/start_mcp_gateway.sh @@ -292,6 +292,8 @@ if [ -f /opt/gh-aw/actions/check_mcp_servers.sh ]; then echo "Running MCP server checks..." # Store check diagnostic logs in /tmp/gh-aw/mcp-logs/start-gateway.log for artifact upload # Use tee to output to both stdout and the log file + # Enable pipefail so the exit code comes from check_mcp_servers.sh, not tee + set -o pipefail if ! bash /opt/gh-aw/actions/check_mcp_servers.sh \ /tmp/gh-aw/mcp-config/gateway-output.json \ "http://localhost:${MCP_GATEWAY_PORT}" \ @@ -301,6 +303,7 @@ if [ -f /opt/gh-aw/actions/check_mcp_servers.sh ]; then kill $GATEWAY_PID 2>/dev/null || true exit 1 fi + set +o pipefail else echo "WARNING: MCP server check script not found at /opt/gh-aw/actions/check_mcp_servers.sh" echo "Skipping MCP server functionality checks"