Add -L flag to curl command to follow redirects in install.sh

The previous curl command in install.sh was failing due to a permanent redirect on the GitHub API endpoint. This error was manifesting as a "Moved Permanently" message when attempting to fetch the latest release version. By adding the -L flag to the curl command, the script now correctly follows the redirect to the new URL, ensuring the latest version information is accurately retrieved. This change resolves the error and ensures the installation script operates reliably.
This commit is contained in:
Geetansh 2023-10-17 02:28:25 +05:30 committed by Nicolas Meienberger
parent adc983bccd
commit 3b25969619

View file

@ -166,7 +166,7 @@ function check_dependency_and_install() {
# If version was not given it will install the latest version # If version was not given it will install the latest version
if [[ "${VERSION}" == "latest" ]]; then if [[ "${VERSION}" == "latest" ]]; then
LATEST_VERSION=$(curl -s https://api.github.com/repos/runtipi/runtipi/releases/latest | grep tag_name | cut -d '"' -f4) LATEST_VERSION=$(curl -sL https://api.github.com/repos/runtipi/runtipi/releases/latest | grep tag_name | cut -d '"' -f4)
VERSION="${LATEST_VERSION}" VERSION="${LATEST_VERSION}"
fi fi