From 78f31aa464a17918e125df40b893e403dd3ef8a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Bergstro=CC=88m?= Date: Fri, 2 Feb 2024 20:14:50 -0300 Subject: [PATCH] chore: move variable initialization Move it after `set -x` so we can use DEBUG. PR: https://github.com/jbergstroem/hadolint-gh-action/pull/139 --- install.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 89db754..b7a4c63 100755 --- a/install.sh +++ b/install.sh @@ -1,15 +1,14 @@ #!/usr/bin/env bash -CI=${GITHUB_ACTIONS:-} - [[ -n "${DEBUG}" ]] && set -x set -euo pipefail shopt -s nullglob globstar -[[ -z ${CI} ]] && echo "Will only run in Github Actions" && exit 1 - +CI=${GITHUB_ACTIONS:-} VERSION=${version:-} +[[ -z ${CI} ]] && echo "Will only run in Github Actions" && exit 1 + DOWNLOAD="false" # Check if hadolint is installed and compare versions to decide # if we should download a new version