Skip to content

Fix shell quoting in verify-gomod failure messaging#752

Draft
hamistao with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-verify-gomod-failure
Draft

Fix shell quoting in verify-gomod failure messaging#752
hamistao with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-verify-gomod-failure

Conversation

Copilot AI commented Jul 7, 2026

Copy link
Copy Markdown

The verify-gomod GitHub Actions job was failing with a misleading shell error from .github/scripts/check-gomod.sh. Instead of only reporting an out-of-date module file, the script executed its remediation hint because the message used backticks.

  • Root cause

    • Failure-path messages in check-gomod.sh used backticks:
      • `cd actions && go mod tidy`
      • `cd interoperability && go mod tidy`
    • In Bash, backticks trigger command substitution, so the hint was executed while building the error output.
  • Change

    • Replace backticks with quoted literals in the remediation messages for:
      • actions
      • interoperability
    • Keep the script behavior unchanged outside the failure messaging path.
  • Effect

    • verify-gomod now reports the actual module drift cleanly, without injecting unrelated cd errors into the logs.
    • The failure output is now actionable and points directly to the required tidy command.
# before
echo "actions Go mod isn't up to date. Please run `cd actions && go mod tidy`"

# after
echo "actions Go mod isn't up to date. Please run 'cd actions && go mod tidy'"

Copilot AI changed the title [WIP] Fix failing GitHub Actions job verify-gomod Fix shell quoting in verify-gomod failure messaging Jul 7, 2026
Copilot AI requested a review from hamistao July 7, 2026 20:23
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