fixed error codes

This commit is contained in:
Lucas Gravley 2020-06-22 12:16:32 -05:00
parent 32232a2442
commit 64dba67f88

View file

@ -1739,10 +1739,26 @@ LintCodebase()
echo "---------------------------" echo "---------------------------"
echo "File:[$FILE]" echo "File:[$FILE]"
################################ ####################
# Lint the file with the rules # # Set the base Var #
################################ ####################
LINT_CMD=$(cd "$GITHUB_WORKSPACE" || exit; $LINTER_COMMAND "$FILE" 2>&1) LINT_CMD=''
#######################################
# Corner case for Powershell subshell #
#######################################
if [[ "$FILE_TYPE" == "POWERSHELL" ]]; then
################################
# Lint the file with the rules #
################################
# Need to append "'" to make the pwsh call syntax correct, also exit with exit code from inner subshell
LINT_CMD=$(cd "$GITHUB_WORKSPACE/$TEST_CASE_FOLDER" || exit; $LINTER_COMMAND "$FILE" \' 2>&1 ; exit "$?")
else
################################
# Lint the file with the rules #
################################
LINT_CMD=$(cd "$GITHUB_WORKSPACE" || exit; $LINTER_COMMAND "$FILE" 2>&1)
fi
####################### #######################
# Load the error code # # Load the error code #
@ -1913,8 +1929,8 @@ TestCodebase()
################################ ################################
# Lint the file with the rules # # Lint the file with the rules #
################################ ################################
# Need to append "'" to make the pwsh call syntax correct # Need to append "'" to make the pwsh call syntax correct, also exit with exit code from inner subshell
LINT_CMD=$(cd "$GITHUB_WORKSPACE/$TEST_CASE_FOLDER" || exit; $LINTER_COMMAND "$FILE" \' 2>&1) LINT_CMD=$(cd "$GITHUB_WORKSPACE/$TEST_CASE_FOLDER" || exit; $LINTER_COMMAND "$FILE" \' 2>&1 ; exit "$?")
else else
################################ ################################
# Lint the file with the rules # # Lint the file with the rules #