Skip to content

Harden go.mod loop against newline-containing paths in validate-go-version workflow#8907

Closed
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-code-for-review-comment
Closed

Harden go.mod loop against newline-containing paths in validate-go-version workflow#8907
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-code-for-review-comment

Conversation

Copilot AI commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Addresses review comment r3503331591 on PR #8906: the for f in $(find ...) loop over go.mod files breaks if any matched path contains whitespace or a newline.

Change

  • Replace the word-splitting for loop with a null-delimited find -print0 piped into while IFS= read -r -d '' in .github/workflows/validate-go-version.yml.
while IFS= read -r -d '' f; do
  VERSION=$(grep -m1 '^go ' "$f" | awk '{print $2}')
  ...
done < <(find cli/azd -name 'go.mod' -print0)

Scope is limited to the go.mod loop called out in the linked comment; the other loops are left unchanged.

Co-authored-by: mikeharder <9459391+mikeharder@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix code based on review comment Harden go.mod loop against newline-containing paths in validate-go-version workflow Jul 1, 2026
Copilot AI requested a review from mikeharder July 1, 2026 04:46
@mikeharder mikeharder closed this Jul 1, 2026
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