Use exact match for HTTP status code check

grep -q 200 could match 2001 or other superstrings; -qx anchors
to the full line which is correct for curl's %{http_code} output.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
torlando-tech
2026-03-03 23:33:10 -05:00
parent 8ebb637a78
commit fd62d5042f

View File

@@ -78,7 +78,7 @@ jobs:
echo "Downloading assets for ${tag}..."
for asset in bootloader.bin partitions.bin boot_app0.bin firmware.bin; do
url="https://github.com/${{ github.repository }}/releases/download/${tag}/${asset}"
if curl -sL -o "${dir}/${asset}" -w '%{http_code}' "${url}" | grep -q 200; then
if curl -sL -o "${dir}/${asset}" -w '%{http_code}' "${url}" | grep -qx 200; then
echo " ${asset} OK"
else
rm -f "${dir}/${asset}"