From e5b4fae3826fd840b72334787c42dea23e7a296d Mon Sep 17 00:00:00 2001 From: Kazuma Watanabe Date: Sun, 25 Dec 2022 08:05:29 +0000 Subject: [PATCH] test --- install_linux.sh | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/install_linux.sh b/install_linux.sh index ef33e0f07a..ddc05fa65f 100755 --- a/install_linux.sh +++ b/install_linux.sh @@ -35,7 +35,7 @@ echo "os=$os" echo -e "\n\n====================================================" get_latest_release() { - curl --silent "https://api.github.com/repos/terraform-linters/tflint/releases/latest" | # Get latest release from GitHub api + curl --fail "https://api.github.com/repos/terraform-linters/tflint/releases/latest" | # Get latest release from GitHub api grep '"tag_name":' | # Get tag line sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value } @@ -52,14 +52,8 @@ else fi echo "Downloading TFLint $version" -curl --fail --silent -L -o "${download_zip}" "https://github.com/terraform-linters/tflint/releases/download/${version}/tflint_${os}.zip" -retVal=$? -if [ $retVal -ne 0 ]; then - echo "Failed to download tflint_${os}.zip" - exit $retVal -else - echo "Downloaded successfully" -fi +curl --fail -L -o "${download_zip}" "https://github.com/terraform-linters/tflint/releases/download/${version}/tflint_${os}.zip" +echo "Downloaded successfully" echo -e "\n\n====================================================" echo "Unpacking ${download_zip} ..."