Skip to content

Commit bb6ef88

Browse files
committed
refactor: use if for var absence check uniformly
1 parent 53b97c9 commit bb6ef88

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/java_build_utils.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,11 @@ jvb::mvn_cmd() {
116116
################################################################################
117117

118118
jvb::__auto_run_when_source() {
119-
# set VAR IF absent
120-
JVB_JAVA_OPT_DEBUG_PORT="${JVB_JAVA_OPT_DEBUG_PORT:-$JVB_JAVA_OPT_DEFAULT_DEBUG_PORT}"
119+
# set VAR if absent
120+
121+
if [ -z "${JVB_JAVA_OPT_DEBUG_PORT:-}" ]; then
122+
JVB_JAVA_OPT_DEBUG_PORT="$JVB_JAVA_OPT_DEFAULT_DEBUG_PORT"
123+
fi
121124

122125
if [ -z "${JVB_JAVA_OPTS[*]:-}" ]; then
123126
JVB_JAVA_OPTS=("${JVB_DEFAULT_JAVA_OPTS[@]}")

0 commit comments

Comments
 (0)