File tree 1 file changed +7
-0
lines changed
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -358,14 +358,21 @@ getJavaMemory() {
358
358
true_value () {
359
359
local VALUE
360
360
VALUE=$( echo " $1 " | tr ' [:upper:]' ' [:lower:]' )
361
+ # Look for TRUE values.
361
362
if [ " $VALUE " = " 1" ] || [ " $VALUE " = " true" ] || [ " $VALUE " = " yes" ] || [ " $VALUE " = " on" ]; then
362
363
# Return a true value (success).
363
364
return 0
364
365
fi
366
+ # Look for FALSE values.
365
367
if [ " $VALUE " = " 0" ] || [ " $VALUE " = " false" ] || [ " $VALUE " = " no" ] || [ " $VALUE " = " off" ]; then
366
368
# Return a false value (failure).
367
369
return 1
368
370
fi
371
+ # Assume FALSE if value is not defined.
372
+ if [ " $VALUE " = " " ]; then
373
+ # Return a false value (failure).
374
+ return 1
375
+ fi
369
376
printf " Invalid true/false value: \" $1 \" \n" >&2
370
377
# Return a false value (failure) in case of invalid true/false input.
371
378
return 1
You can’t perform that action at this time.
0 commit comments