File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -362,14 +362,21 @@ getJavaMemory() {
362362true_value () {
363363 local VALUE
364364 VALUE=$( echo " $1 " | tr ' [:upper:]' ' [:lower:]' )
365+ # Look for TRUE values.
365366 if [ " $VALUE " = " 1" ] || [ " $VALUE " = " true" ] || [ " $VALUE " = " yes" ] || [ " $VALUE " = " on" ]; then
366367 # Return a true value (success).
367368 return 0
368369 fi
370+ # Look for FALSE values.
369371 if [ " $VALUE " = " 0" ] || [ " $VALUE " = " false" ] || [ " $VALUE " = " no" ] || [ " $VALUE " = " off" ]; then
370372 # Return a false value (failure).
371373 return 1
372374 fi
375+ # Assume FALSE if value is not defined.
376+ if [ " $VALUE " = " " ]; then
377+ # Return a false value (failure).
378+ return 1
379+ fi
373380 printf " Invalid true/false value: \" $1 \" \n" >&2
374381 # Return a false value (failure) in case of invalid true/false input.
375382 return 1
You can’t perform that action at this time.
0 commit comments