From 55f24a76fd915afe59e11ac6955cdd9b278ad431 Mon Sep 17 00:00:00 2001 From: Julien Escario Date: Thu, 23 Jul 2020 16:47:00 +0200 Subject: [PATCH] Compose _hash_url variable in function _getRepoHash() function from HASH_URL variable --- acme.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/acme.sh b/acme.sh index f766ef2..bde2b1a 100755 --- a/acme.sh +++ b/acme.sh @@ -8,6 +8,8 @@ PROJECT_ENTRY="acme.sh" PROJECT="https://github.com/acmesh-official/$PROJECT_NAME" +HASH_URL="https://api.github.com/repos/acmesh-official/$PROJECT_NAME/git/refs/" + DEFAULT_INSTALL_HOME="$HOME/.$PROJECT_NAME" _WINDOWS_SCHEDULER_NAME="$PROJECT_NAME.cron" @@ -6379,7 +6381,7 @@ _installOnline() { _getRepoHash() { _hash_path=$1 shift - _hash_url="https://api.github.com/repos/acmesh-official/$PROJECT_NAME/git/refs/$_hash_path" + _hash_url="$HASH_URL$_hash_path" _get $_hash_url | tr -d "\r\n" | tr '{},' '\n' | grep '"sha":' | cut -d '"' -f 4 }