From cd9be7eff96cbde072e4bef696416dc401a46c45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Qui=C3=B1ones?= Date: Sat, 15 Mar 2025 01:17:21 -0500 Subject: [PATCH] ci(update): removing invalid control characters from gh response --- .github/update.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/update.sh b/.github/update.sh index a5196ac..8d2eaa8 100755 --- a/.github/update.sh +++ b/.github/update.sh @@ -17,6 +17,7 @@ get_beta_tag_short_meta() { } get_twilight_tag_full_meta() { + # Remove control characters gh api repos/zen-browser/desktop/releases/tags/twilight } @@ -26,7 +27,7 @@ beta_tag=$(get_beta_tag_short_meta) get_twilight_release_artifact_meta_from_zen_repo() { arch=$1 - echo "$twilight_tag" | jq -r --arg arch "$arch" \ + echo "$twilight_tag" | tr -d '\000-\031' | jq -r --arg arch "$arch" \ '.assets[] | select(.name | contains("zen.linux") and contains($arch)) | "\(.id) \(.name)"' } @@ -46,7 +47,7 @@ get_updated_at_of_twilight_artifact_from_zen_repo() { } get_twilight_version_name() { - echo "$twilight_tag" | jq -r '.name' | grep -oE '([0-9\.])+(t|-t.[0-9]+)' + echo "$twilight_tag" | tr -d '\000-\031' | jq -r '.name' | grep -oE '([0-9\.])+(t|-t.[0-9]+)' } resolve_full_sha1_from_zen_repo() { @@ -64,7 +65,7 @@ resolve_version_remote_sha1() { version="$1" if [ "$version" = "twilight" ]; then - short_sha1=$(echo "$twilight_tag" | jq -r '.body' | grep -oE '^[-•] [0-9a-f]{7,}' | head -n 1 | awk '{print $2}') + short_sha1=$(echo "$twilight_tag" | tr -d '\000-\031' | jq -r '.body' | grep -oE '^[-•] [0-9a-f]{7,}' | head -n 1 | awk '{print $2}') resolve_full_sha1_from_zen_repo "$short_sha1" return fi