mirror of
https://github.com/super-linter/super-linter.git
synced 2024-11-26 08:01:03 -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 "---------------------------"
|
||||||
echo "File:[$FILE]"
|
echo "File:[$FILE]"
|
||||||
|
|
||||||
|
####################
|
||||||
|
# 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 the file with the rules #
|
||||||
################################
|
################################
|
||||||
LINT_CMD=$(cd "$GITHUB_WORKSPACE" || exit; $LINTER_COMMAND "$FILE" 2>&1)
|
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 #
|
||||||
|
|
Loading…
Reference in a new issue