Skip to content

Commit

Permalink
fix curl call on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
sebthom committed Jul 19, 2024
1 parent 36df7e8 commit 30d0900
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ runs:
macOS)
app_home="$RUNNER_TEMP/yq"
app_target_bin=yq
null_file=/dev/null
case "$(machine)" in
*arm*) app_source_bin='yq_darwin_arm64' ;;
*) app_source_bin='yq_darwin_amd64' ;;
Expand All @@ -87,6 +88,7 @@ runs:
Linux)
app_home="$RUNNER_TEMP/yq"
app_target_bin=yq
null_file=/dev/null
case $(uname -m) in # https://stackoverflow.com/questions/45125516/possible-values-for-uname-m
i386|i686) app_source_bin='yq_linux_386' ;;
x86_64) app_source_bin='yq_linux_amd64' ;;
Expand All @@ -98,6 +100,7 @@ runs:
app_home="$(cygpath "$RUNNER_TEMP")/yq"
app_target_bin=yq.exe
app_source_bin='yq_windows_amd64.exe'
null_file=nul
;;
esac
Expand All @@ -106,7 +109,7 @@ runs:
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-)
(set -x; curl -sSfL --max-time 5 -o $null_file -w '%{url_effective}' $APP_REPO_ROOT/releases/latest | grep -o '[^/]*$' | cut -c2-)
}
app_downloaded=false
Expand Down

0 comments on commit 30d0900

Please sign in to comment.