@@ -24,10 +24,12 @@ echo " Working directory: $(pwd)"
2424mkdir -p /tmp/gh-aw/safe-inputs/logs
2525
2626# Create initial server.log file for artifact upload
27- echo " Safe Inputs MCP Server Log" > /tmp/gh-aw/safe-inputs/logs/server.log
28- echo " Start time: $( date) " >> /tmp/gh-aw/safe-inputs/logs/server.log
29- echo " ===========================================" >> /tmp/gh-aw/safe-inputs/logs/server.log
30- echo " " >> /tmp/gh-aw/safe-inputs/logs/server.log
27+ {
28+ echo " Safe Inputs MCP Server Log"
29+ echo " Start time: $( date) "
30+ echo " ==========================================="
31+ echo " "
32+ } > /tmp/gh-aw/safe-inputs/logs/server.log
3133
3234# Start the HTTP server in the background
3335echo " Starting safe-inputs MCP HTTP server..."
@@ -47,18 +49,18 @@ for i in {1..10}; do
4749 fi
4850
4951 # Check if server is responding
50- if curl -s -f http://localhost:$GH_AW_SAFE_INPUTS_PORT /health > /dev/null 2>&1 ; then
52+ if curl -s -f " http://localhost:$GH_AW_SAFE_INPUTS_PORT /health" > /dev/null 2>&1 ; then
5153 echo " Safe Inputs MCP server is ready (attempt $i /10)"
5254 break
5355 fi
5456
55- if [ $i -eq 10 ]; then
57+ if [ " $i " -eq 10 ]; then
5658 echo " ERROR: Safe Inputs MCP server failed to start after 10 seconds"
57- echo " Process status: $( ps aux | grep ' [m]cp -server.cjs' || echo ' not running' ) "
59+ echo " Process status: $( pgrep -f ' mcp -server.cjs' || echo ' not running' ) "
5860 echo " Server log contents:"
5961 cat /tmp/gh-aw/safe-inputs/logs/server.log
6062 echo " Checking port availability:"
61- netstat -tuln | grep $GH_AW_SAFE_INPUTS_PORT || echo " Port $GH_AW_SAFE_INPUTS_PORT not listening"
63+ netstat -tuln | grep " $GH_AW_SAFE_INPUTS_PORT " || echo " Port $GH_AW_SAFE_INPUTS_PORT not listening"
6264 exit 1
6365 fi
6466
@@ -67,5 +69,5 @@ for i in {1..10}; do
6769done
6870
6971# Output the configuration for the MCP client
70- echo " port=$GH_AW_SAFE_INPUTS_PORT " >> $GITHUB_OUTPUT
71- echo " api_key=$GH_AW_SAFE_INPUTS_API_KEY " >> $GITHUB_OUTPUT
72+ echo " port=$GH_AW_SAFE_INPUTS_PORT " >> " $GITHUB_OUTPUT "
73+ echo " api_key=$GH_AW_SAFE_INPUTS_API_KEY " >> " $GITHUB_OUTPUT "
0 commit comments