Skip to content

Commit 8bfef14

Browse files
committed
Merge branch 'main' into automatic-restarts
2 parents 011eb85 + f397a46 commit 8bfef14

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

msctl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,14 +362,21 @@ getJavaMemory() {
362362
true_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

0 commit comments

Comments
 (0)