mirror of
https://github.com/YunoHost/package_check.git
synced 2024-09-03 20:06:20 +02:00
Merge pull request #66 from YunoHost/critical-failure-from-linter
Handle return code from linter saying the app should be flagged as broken
This commit is contained in:
commit
c0dd377128
2 changed files with 13 additions and 0 deletions
|
@ -804,6 +804,13 @@ TEST_RESULTS () {
|
||||||
global_level=0
|
global_level=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# If the package linter returned a critical error, the app is flagged as broken / level 0
|
||||||
|
if [ $RESULT_linter -eq -2 ]
|
||||||
|
then
|
||||||
|
ECHO_FORMAT "The package linter reported a critical failure ! App is considered broken !\n" "red" "bold"
|
||||||
|
global_level=0
|
||||||
|
fi
|
||||||
|
|
||||||
if [ $RESULT_alias_traversal -eq 1 ]
|
if [ $RESULT_alias_traversal -eq 1 ]
|
||||||
then
|
then
|
||||||
ECHO_FORMAT "Issue alias_traversal was detected ! Please see here https://github.com/YunoHost/example_ynh/pull/45 to fix that.\n" "red" "bold"
|
ECHO_FORMAT "Issue alias_traversal was detected ! Please see here https://github.com/YunoHost/example_ynh/pull/45 to fix that.\n" "red" "bold"
|
||||||
|
|
|
@ -1500,6 +1500,12 @@ PACKAGE_LINTER () {
|
||||||
else # Fail
|
else # Fail
|
||||||
check_failed
|
check_failed
|
||||||
RESULT_linter=-1
|
RESULT_linter=-1
|
||||||
|
|
||||||
|
# If return code is 2, this is critical failure, app should be considered as broken (level 0)
|
||||||
|
if [ $linter_result -eq 2 ]
|
||||||
|
then
|
||||||
|
RESULT_linter=-2
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue