From b06937b3859ae588286fa8891971efe60f2f4702 Mon Sep 17 00:00:00 2001 From: Pascal Breuer Date: Wed, 7 Sep 2022 10:18:51 +0200 Subject: [PATCH] Fix downloading hugo for macOS after hugo version 0.102.0 --- hugow | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hugow b/hugow index 3aee246..086b676 100755 --- a/hugow +++ b/hugow @@ -260,6 +260,14 @@ download_version() { versionDownloadSuffix="/extended" fi + if [ "$os_type" = "macOS" ]; then + if [ "$versionToDownload" = "LATEST" ]; then + os_arch="universal" + elif [ "$majorVersion" -ge 0 ] && [ "$minorVersion" -ge 102 ]; then + os_arch="universal" + fi + fi + if [ "$versionToDownload" = "LATEST" ]; then latest_release=$($DOWNLOAD_COMMAND $DOWNLOAD_SILENT $DOWNLOAD_REDIRECT ${DOWNLOAD_OUTPUT}- https://api.github.com/repos/gohugoio/hugo/releases/latest) versionToDownload=$(parse_json "$latest_release" "tag_name")