Commit 9a68b93
authored
fix(ci): repair yaml-path validation regex in _update-helm (#11)
The regex was '^\.[a-zA-Z0-9_.\[\]\"'\''-]+$' (single quote inside the
character class). Bash sees the lone ' as the start of a quoted
string, never finds a matching close, and aborts the script:
/home/runner/.../11c37765-eb1d-4999-8298-6e83176c2ab2.sh: line 8:
unexpected EOF while looking for matching `''
Process completed with exit code 2.
Bug surfaced on release run 25112483893 — the first time Update Helm
actually executed end-to-end. Earlier runs either OOMed or used a
manual helm-charts PR (blockscout#177) so the broken script never ran.
Two issues, one fix:
1. Drop the lone single quote from the class. yq paths we use
(.frontend.image.tag, .image.tag) never contain single quotes;
stripping the apostrophe is safe.
2. Use the POSIX bracket-expression idiom for including literal
square brackets: ']' must come first inside [], '[' anywhere
else. The form '\[\]' worked in some regex flavors but breaks
bash's =~ pattern matching. Verified locally that the new form
'^\.[][a-zA-Z0-9_.-]+$' accepts .frontend.image.tag,
.image.tag, .foo[0].bar, and rejects the obvious injection
shapes (semicolons, dollar signs, spaces, backticks, pipes).1 parent 201942e commit 9a68b93
1 file changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
128 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
129 | 133 | | |
130 | 134 | | |
131 | 135 | | |
| |||
0 commit comments