Skip to content

Commit 6b13868

Browse files
authored
[FLINK-36620][cdc-cli] Add support for specifying the --flink-home parameter via an '=' character
This closes #3838
1 parent 087195a commit 6b13868

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

flink-cdc-dist/src/main/flink-cdc-bin/bin/flink-cdc.sh

+11
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,20 @@ args=("$@")
2121
# Check if FLINK_HOME is set in command-line arguments by "--flink-home"
2222
for ((i=0; i < ${#args[@]}; i++)); do
2323
case "${args[i]}" in
24+
--flink-home=*)
25+
# Extract the value after "="
26+
FLINK_HOME_VALUE="${args[i]#*=}"
27+
# Check if the value is not empty
28+
if [[ -n "$FLINK_HOME_VALUE" ]]; then
29+
FLINK_HOME="$FLINK_HOME_VALUE"
30+
echo "[INFO] Set FLINK_HOME to ${FLINK_HOME_VALUE}."
31+
break
32+
fi
33+
;;
2434
--flink-home)
2535
if [[ -n "${args[i+1]}" ]]; then
2636
FLINK_HOME="${args[i+1]}"
37+
echo "[INFO] Set FLINK_HOME to ${FLINK_HOME}."
2738
break
2839
fi
2940
;;

0 commit comments

Comments
 (0)