From dc90a9a9ee7ed26f3c9f8db5fb9f2ba4b13a8300 Mon Sep 17 00:00:00 2001 From: sebthom Date: Fri, 19 Jul 2024 19:38:37 +0200 Subject: [PATCH] fix: "curl: (43) A libcurl function was given a bad argument" --- action.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/action.yml b/action.yml index f2b1857..d536626 100644 --- a/action.yml +++ b/action.yml @@ -100,17 +100,20 @@ runs: app_source_bin='yq_windows_amd64.exe' ;; esac - + echo "app_home: $app_home" echo "app_source_bin: $app_source_bin" echo "app_target_bin: $app_target_bin" - + function get_latest_version() { - (set -x; curl -sSfL --max-time 5 -o /dev/null -w '%{url_effective}' $APP_REPO_ROOT/releases/latest | grep -o '[^/]*$' | cut -c2-) + # currently broken because of https://github.com/curl/curl/issues/13845 + # (set -x; curl -sSfL --max-time 5 -o /dev/null -w '%{url_effective}' $APP_REPO_ROOT/releases/latest | grep -o '[^/]*$' | cut -c2-) + + (set -x; wget --spider --max-redirect=0 --timeout=5 --header="Accept: */*" https://github.com/mikefarah/yq/releases/latest 2>&1 | grep "Location:" | awk '{print $2}' | grep -o '[^/]*$' | cut -c2-) } - + app_downloaded=false - + function download_app() { app_download_url="$APP_REPO_ROOT/releases/download/v$1/$app_source_bin" echo "Downloading [$app_download_url]..." @@ -119,7 +122,7 @@ runs: chmod 777 "$app_home/$app_target_bin" app_downloaded=true } - + case "$INPUTS_VERSION_LOWERCASE" in any) if [[ ! -f "$app_home/$app_target_bin" ]]; then