From 6168112f61572099c96cfe62e311518d5bfac1ad Mon Sep 17 00:00:00 2001 From: Marco Ferrari Date: Mon, 21 Sep 2020 14:43:44 +0200 Subject: [PATCH] Fix ERROR_ON_MISSING_EXEC_BIT initialization --- lib/linter.sh | 2 +- lib/worker.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/linter.sh b/lib/linter.sh index 84542938..f0298f23 100755 --- a/lib/linter.sh +++ b/lib/linter.sh @@ -257,7 +257,7 @@ DEFAULT_IFS="${IFS}" # Get the Default IFS for up ############################################################### DEFAULT_DISABLE_ERRORS='false' # Default to enabling errors export DEFAULT_DISABLE_ERRORS # Workaround SC2034 -ERROR_ON_MISSING_EXEC_BIT='false' # Default to report a warning if a shell script doesn't have the executable bit set to 1 +ERROR_ON_MISSING_EXEC_BIT="${ERROR_ON_MISSING_EXEC_BIT:-false}" # Default to report a warning if a shell script doesn't have the executable bit set to 1 export ERROR_ON_MISSING_EXEC_BIT RAW_FILE_ARRAY=() # Array of all files that were changed export RAW_FILE_ARRAY # Workaround SC2034 diff --git a/lib/worker.sh b/lib/worker.sh index 705839eb..5ac42607 100755 --- a/lib/worker.sh +++ b/lib/worker.sh @@ -297,6 +297,7 @@ function LintCodebase() { # Check the shell for errors # ############################## if [ ${ERROR_CODE} -ne 0 ]; then + debug "Found errors. Error code: ${ERROR_CODE}, File type: ${FILE_TYPE}, Error on missing exec bit: ${ERROR_ON_MISSING_EXEC_BIT}" if [[ ${FILE_TYPE} == "BASH_EXEC" ]] && [[ "${ERROR_ON_MISSING_EXEC_BIT}" == "false" ]]; then ######## # WARN #