mirror of https://github.com/kdabir/has.git
extract magic number into a variable
This commit is contained in:
parent
79f3eb8bba
commit
b60c239bc4
9
has
9
has
|
@ -177,9 +177,14 @@ else
|
|||
__detect $cmd
|
||||
done
|
||||
|
||||
## display found / total
|
||||
# echo ${OK} / $(($OK+$KO))
|
||||
if [[ "$KO" -gt "126" ]]; then
|
||||
exit "126"
|
||||
|
||||
## max status code that can be returned
|
||||
MAX_STATUS_CODE=126
|
||||
|
||||
if [[ "$KO" -gt "${MAX_STATUS_CODE}" ]]; then
|
||||
exit "${MAX_STATUS_CODE}"
|
||||
else
|
||||
exit "${KO}"
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue