mirror of
https://github.com/super-linter/super-linter.git
synced 2024-12-22 20:52:12 -05:00
fixed error codes
This commit is contained in:
parent
32232a2442
commit
64dba67f88
1 changed files with 22 additions and 6 deletions
|
@ -1739,10 +1739,26 @@ LintCodebase()
|
|||
echo "---------------------------"
|
||||
echo "File:[$FILE]"
|
||||
|
||||
################################
|
||||
# Lint the file with the rules #
|
||||
################################
|
||||
LINT_CMD=$(cd "$GITHUB_WORKSPACE" || exit; $LINTER_COMMAND "$FILE" 2>&1)
|
||||
####################
|
||||
# Set the base Var #
|
||||
####################
|
||||
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 #
|
||||
|
@ -1913,8 +1929,8 @@ TestCodebase()
|
|||
################################
|
||||
# Lint the file with the rules #
|
||||
################################
|
||||
# Need to append "'" to make the pwsh call syntax correct
|
||||
LINT_CMD=$(cd "$GITHUB_WORKSPACE/$TEST_CASE_FOLDER" || exit; $LINTER_COMMAND "$FILE" \' 2>&1)
|
||||
# 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 #
|
||||
|
|
Loading…
Reference in a new issue