mirror of
https://github.com/super-linter/super-linter.git
synced 2024-12-26 06:32:26 -05:00
fix tty issues
This commit is contained in:
parent
44bfbdb2b1
commit
e9c3938982
1 changed files with 16 additions and 0 deletions
|
@ -229,6 +229,14 @@ function LintCodebase() {
|
|||
R --slave -e "errors <- lintr::lint('$FILE');print(errors);quit(save = 'no', status = if (length(errors) > 0) 1 else 0)" 2>&1
|
||||
)
|
||||
#LINTER_COMMAND="lintr::lint('${FILE}')"
|
||||
#########################################################
|
||||
# Corner case for C# as it writes to tty and not stdout #
|
||||
#########################################################
|
||||
elif [[ ${FILE_TYPE} == "CSHARP" ]]; then
|
||||
LINT_CMD=$(
|
||||
cd "${GITHUB_WORKSPACE}" || exit
|
||||
${LINTER_CMD} "${FILE}" | tee /dev/tty2 2>&1; exit "${PIPESTATUS[0]}"
|
||||
)
|
||||
else
|
||||
################################
|
||||
# Lint the file with the rules #
|
||||
|
@ -468,6 +476,14 @@ function TestCodebase() {
|
|||
cd "${GITHUB_WORKSPACE}" || exit
|
||||
R --slave -e "errors <- lintr::lint('$FILE');print(errors);quit(save = 'no', status = if (length(errors) > 0) 1 else 0)" 2>&1
|
||||
)
|
||||
#########################################################
|
||||
# Corner case for C# as it writes to tty and not stdout #
|
||||
#########################################################
|
||||
elif [[ ${FILE_TYPE} == "CSHARP" ]]; then
|
||||
LINT_CMD=$(
|
||||
cd "${GITHUB_WORKSPACE}" || exit
|
||||
${LINTER_CMD} "${FILE}" | tee /dev/tty2 2>&1; exit "${PIPESTATUS[0]}"
|
||||
)
|
||||
else
|
||||
################################
|
||||
# Lint the file with the rules #
|
||||
|
|
Loading…
Reference in a new issue