e2e: simplify failure-list join to bash param expansion · Entire
e2e: simplify failure-list join to bash param expansion
810086c→main·
toothbrush·2w ago·1 file·+4 added/-4 removed
Replace the tr|sed|paste|sed pipeline with leading-space strip + ", " substitution. Same output for empty/single/multi; less to read.
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com
Sessions
1ec42020fb6aView transcript
[?
Simplify E2E Failure List JoinClaude Code·1 step](/content/gh/entireio/cli/session/479bf0fb-c2e0-425f-8c94-20773c8c7533#timeline-1ec42020fb6a/index.html)
Changes
1
.github/workflows
Me2e.yml+4/-4
171 unmodified lines
172
173
174
175
176
177
178
175
176
177
178
179
180
181
171 unmodified lines
$failed_names
EOF
# Normalize to comma-separated lists. paste -d takes a delimiter
# *set* used in rotation, so join with a single ',' then space it out.
red=$(echo $red | tr ' ' '\n' | sed '/^$/d' | paste -sd, - | sed 's/,/, /g')
yellow=$(echo $yellow | tr ' ' '\n' | sed '/^$/d' | paste -sd, - | sed 's/,/, /g')
# Each list was built as " a b c" (leading space, space-separated).
# Strip the leading space, then join on ", ". Empty stays empty.
red="${red# }"; red="${red// /, }"
yellow="${yellow# }"; yellow="${yellow// /, }"
if [ -n "$red" ]; then
color="#d50200"
M.github/workflows/e2e.yml+4/-4