From d470867c10f4b8dca076704d83d81ae46d4f2d81 Mon Sep 17 00:00:00 2001 From: fleish <2106430+fleish@users.noreply.github.com> Date: Fri, 14 Jan 2022 11:55:02 -0800 Subject: [PATCH] Fix authydesktop downloadURL Checks for redirect_url and replaces space to be urlencoded --- fragments/labels/authydesktop.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fragments/labels/authydesktop.sh b/fragments/labels/authydesktop.sh index 9051669..07b57d5 100644 --- a/fragments/labels/authydesktop.sh +++ b/fragments/labels/authydesktop.sh @@ -1,7 +1,7 @@ authydesktop) name="Authy Desktop" type="dmg" - downloadURL="https://electron.authy.com/download?channel=stable&arch=x64&platform=darwin&version=latest&product=authy" + downloadURL=$(curl -s -w '%{redirect_url}' -o /dev/null "https://electron.authy.com/download?channel=stable&arch=x64&platform=darwin&version=latest&product=authy" | sed 's/\ /%20/g') appNewVersion="$(curl -sfL --output /dev/null -r 0-0 "${downloadURL}" --remote-header-name --remote-name -w "%{url_effective}\n" | grep -o -E '([a-zA-Z0-9\_.%-]*)\.(dmg|pkg|zip|tbz)$' | sed -E 's/.*-([0-9.]*)\.dmg/\1/g')" expectedTeamID="9EVH78F4V4" ;;