Skip to content

Fix shell script quote mismatch errors in docs-quality workflow#5

Draft
Copilot wants to merge 3 commits into
mainfrom
copilot/fix-3b102229-12c6-445f-ae3c-cd7da40f59cc
Draft

Fix shell script quote mismatch errors in docs-quality workflow#5
Copilot wants to merge 3 commits into
mainfrom
copilot/fix-3b102229-12c6-445f-ae3c-cd7da40f59cc

Conversation

Copilot AI commented Aug 16, 2025

Copy link
Copy Markdown
Contributor

This PR fixes shell script syntax errors in the documentation quality workflow that were causing the build to fail with `unexpected EOF while looking for matching '``.

Issues Fixed

The workflow contained multiple quote-related problems in shell script steps:

  1. Improper variable interpolation with single quotes: Lines using echo '💻 Code examples: $code_blocks' were not expanding variables because single quotes prevent variable interpolation in bash.

  2. Backtick matching issues: The grep pattern grep -r "```" docs/ was causing shell parsing errors due to backticks inside double quotes.

Changes Made

  • Line 28: Changed echo '💻 Code examples: $code_blocks' to echo "💻 Code examples: $code_blocks" to enable proper variable interpolation
  • Line 43: Changed echo '- 💻 Code examples: $code_blocks' to echo "- 💻 Code examples: $code_blocks" for consistent variable expansion
  • Line 27: Changed grep -r "```" to grep -r '```' to avoid shell backtick interpretation issues

Example

Before (broken):

code_blocks=$(grep -r "```" docs/ | wc -l)  # Shell parsing error
echo '💻 Code examples: $code_blocks'        # Outputs literal: $code_blocks

After (fixed):

code_blocks=$(grep -r '```' docs/ | wc -l)   # Clean grep pattern
echo "💻 Code examples: $code_blocks"        # Outputs expanded: 💻 Code examples: 42

The workflow now properly counts documentation metrics and generates the GitHub step summary without syntax errors.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits August 16, 2025 18:10
Co-authored-by: JayeshCC <92138651+JayeshCC@users.noreply.github.com>
Co-authored-by: JayeshCC <92138651+JayeshCC@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix shell script unmatched quote in docs-quality workflow Fix shell script quote mismatch errors in docs-quality workflow Aug 16, 2025
Copilot AI requested a review from JayeshCC August 16, 2025 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants