Skip to content

Commit 661d424

Browse files
authored
Fix SC2129: group consecutive redirects in shell scripts (#14594)
1 parent a792c1a commit 661d424

5 files changed

Lines changed: 23 additions & 10 deletions

File tree

.changeset/patch-group-github-output-redirects.md

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

actions/setup/js/mcp_server_core.test.cjs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -781,9 +781,11 @@ echo "result=success" >> $GITHUB_OUTPUT
781781
fs.writeFileSync(
782782
handlerPath,
783783
`#!/bin/bash
784-
echo "first=value1" >> $GITHUB_OUTPUT
785-
echo "second=value2" >> $GITHUB_OUTPUT
786-
echo "third=value with spaces" >> $GITHUB_OUTPUT
784+
{
785+
echo "first=value1"
786+
echo "second=value2"
787+
echo "third=value with spaces"
788+
} >> $GITHUB_OUTPUT
787789
`,
788790
{ mode: 0o755 }
789791
);

actions/setup/sh/start_mcp_gateway.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,9 @@ print_timing $SCRIPT_START_TIME "Overall gateway startup"
422422
echo ""
423423

424424
# Output PID as GitHub Actions step output for use in cleanup
425-
echo "gateway-pid=$GATEWAY_PID" >> $GITHUB_OUTPUT
426425
# Output port and API key for use in stop script (per MCP Gateway Specification v1.1.0)
427-
echo "gateway-port=${MCP_GATEWAY_PORT}" >> $GITHUB_OUTPUT
428-
echo "gateway-api-key=${MCP_GATEWAY_API_KEY}" >> $GITHUB_OUTPUT
426+
{
427+
echo "gateway-pid=$GATEWAY_PID"
428+
echo "gateway-port=${MCP_GATEWAY_PORT}"
429+
echo "gateway-api-key=${MCP_GATEWAY_API_KEY}"
430+
} >> $GITHUB_OUTPUT

actions/setup/sh/start_safe_inputs_server.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,5 +126,7 @@ for i in {1..10}; do
126126
done
127127

128128
# Output the configuration for the MCP client
129-
echo "port=$GH_AW_SAFE_INPUTS_PORT" >> "$GITHUB_OUTPUT"
130-
echo "api_key=$GH_AW_SAFE_INPUTS_API_KEY" >> "$GITHUB_OUTPUT"
129+
{
130+
echo "port=$GH_AW_SAFE_INPUTS_PORT"
131+
echo "api_key=$GH_AW_SAFE_INPUTS_API_KEY"
132+
} >> "$GITHUB_OUTPUT"

actions/setup/sh/start_safe_outputs_server.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,5 +126,7 @@ for i in {1..60}; do
126126
done
127127

128128
# Output the configuration for the MCP client
129-
echo "port=$GH_AW_SAFE_OUTPUTS_PORT" >> "$GITHUB_OUTPUT"
130-
echo "api_key=$GH_AW_SAFE_OUTPUTS_API_KEY" >> "$GITHUB_OUTPUT"
129+
{
130+
echo "port=$GH_AW_SAFE_OUTPUTS_PORT"
131+
echo "api_key=$GH_AW_SAFE_OUTPUTS_API_KEY"
132+
} >> "$GITHUB_OUTPUT"

0 commit comments

Comments
 (0)