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