Fix bash command substitution error in release pipeline #39

Merged
Copilot merged 2 commits from copilot/fix-release-pipeline-error into main 2026-01-09 01:10:46 +00:00
Copilot commented 2026-01-09 00:38:38 +00:00 (Migrated from github.com)

Pull Request

Purpose

Bash interprets unescaped triple backticks in echo statements as command substitution operators, causing the release pipeline to fail with command not found errors when writing markdown to GITHUB_STEP_SUMMARY.

Change Summary

Escaped all 40 instances of triple backticks in release_pipeline.yml:

- echo "```json"
+ echo "\`\`\`json"

- echo "```"
+ echo "\`\`\`"

Without escaping, bash parses ` ` ` as: command substitution open → close → open, attempting to execute the text between as commands. With escaping, backticks become literal characters that render correctly as markdown code fences.

Testing Evidence

  • Reproduced error locally with unescaped backticks
  • Verified fix with escaped backticks executes without error
  • Confirmed all workflow files checked for similar issues

Risk and Rollback

Risk: Minimal. Changes only affect string escaping in shell scripts.

Rollback: Revert commit or re-run workflow from previous commit.

Checklist

  • Follows Conventional Commits
  • Tests added or updated (N/A - workflow syntax fix)
  • Documentation updated if required (N/A)
  • License header present where applicable (N/A)
  • Linked issue(s) referenced

Reviewer Notes

The error manifested specifically in the "Normalize dates" step but affected all echo statements writing markdown code blocks throughout the workflow. No logic changes—only character escaping.

Review and Approval

Original prompt

Release Pipeline error:
Normalize dates
Run set -euo pipefail
/home/runner/work/_temp/dc36c711-e22a-4fd2-9707-0882a91c7f3d.sh: line 12: $'json\n echo today_utc:2026-01-09\n echo ': command not found
Error: Process completed with exit code 1.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

# Pull Request ## Purpose Bash interprets unescaped triple backticks in echo statements as command substitution operators, causing the release pipeline to fail with `command not found` errors when writing markdown to `GITHUB_STEP_SUMMARY`. ## Change Summary Escaped all 40 instances of triple backticks in `release_pipeline.yml`: ```diff - echo "```json" + echo "\`\`\`json" - echo "```" + echo "\`\`\`" ``` Without escaping, bash parses `` ` `` `` ` `` `` ` `` as: command substitution open → close → open, attempting to execute the text between as commands. With escaping, backticks become literal characters that render correctly as markdown code fences. ## Testing Evidence - Reproduced error locally with unescaped backticks - Verified fix with escaped backticks executes without error - Confirmed all workflow files checked for similar issues ## Risk and Rollback **Risk**: Minimal. Changes only affect string escaping in shell scripts. **Rollback**: Revert commit or re-run workflow from previous commit. ## Checklist - [x] Follows Conventional Commits - [x] Tests added or updated (N/A - workflow syntax fix) - [x] Documentation updated if required (N/A) - [x] License header present where applicable (N/A) - [x] Linked issue(s) referenced ## Reviewer Notes The error manifested specifically in the "Normalize dates" step but affected all echo statements writing markdown code blocks throughout the workflow. No logic changes—only character escaping. ## Review and Approval <!-- START COPILOT CODING AGENT SUFFIX --> <!-- START COPILOT ORIGINAL PROMPT --> <details> <summary>Original prompt</summary> > Release Pipeline error: > Normalize dates > Run set -euo pipefail > /home/runner/work/_temp/dc36c711-e22a-4fd2-9707-0882a91c7f3d.sh: line 12: $'json\n echo today_utc:2026-01-09\n echo ': command not found > Error: Process completed with exit code 1. </details> <!-- START COPILOT CODING AGENT TIPS --> --- 💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs.
jmiller-moko (Migrated from github.com) reviewed 2026-01-09 00:38:38 +00:00
copilot-pull-request-reviewer[bot] (Migrated from github.com) reviewed 2026-01-09 00:51:51 +00:00
copilot-pull-request-reviewer[bot] (Migrated from github.com) left a comment

Pull request overview

This pull request fixes a bash command substitution error in the release pipeline workflow. Unescaped triple backticks in echo statements were being interpreted by bash as command substitution operators, causing the workflow to fail with "command not found" errors when attempting to write markdown code fences to GITHUB_STEP_SUMMARY.

Key Changes:

  • Escaped all 40 instances of triple backticks in echo statements throughout release_pipeline.yml
  • Changed echo "```" to echo "\``"andecho "```json"toecho "```json"`

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

## Pull request overview This pull request fixes a bash command substitution error in the release pipeline workflow. Unescaped triple backticks in echo statements were being interpreted by bash as command substitution operators, causing the workflow to fail with "command not found" errors when attempting to write markdown code fences to `GITHUB_STEP_SUMMARY`. **Key Changes:** - Escaped all 40 instances of triple backticks in echo statements throughout `release_pipeline.yml` - Changed `echo "```"` to `echo "\`\`\`"` and `echo "```json"` to `echo "\`\`\`json"` --- 💡 <a href="/mokoconsulting-tech/moko-cassiopeia/new/main/.github/instructions?filename=*.instructions.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Add Copilot custom instructions</a> for smarter, more guided reviews. <a href="https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Learn how to get started</a>.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoCassiopeia#39