This is an automated email from the ASF dual-hosted git repository.

leonard pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink-cdc.git


The following commit(s) were added to refs/heads/master by this push:
     new 6b13868dd [FLINK-36620][cdc-cli] Add support for specifying the 
--flink-home parameter via an '=' character
6b13868dd is described below

commit 6b13868dd5ac7474c946bdc41005feed616d9be8
Author: Jzjsnow <5797...@qq.com>
AuthorDate: Thu Jan 16 18:08:57 2025 +0800

    [FLINK-36620][cdc-cli] Add support for specifying the --flink-home 
parameter via an '=' character
    
    This closes #3838
---
 flink-cdc-dist/src/main/flink-cdc-bin/bin/flink-cdc.sh | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/flink-cdc-dist/src/main/flink-cdc-bin/bin/flink-cdc.sh 
b/flink-cdc-dist/src/main/flink-cdc-bin/bin/flink-cdc.sh
index 6875c1c81..78c9439c5 100644
--- a/flink-cdc-dist/src/main/flink-cdc-bin/bin/flink-cdc.sh
+++ b/flink-cdc-dist/src/main/flink-cdc-bin/bin/flink-cdc.sh
@@ -21,9 +21,20 @@ args=("$@")
 # Check if FLINK_HOME is set in command-line arguments by "--flink-home"
 for ((i=0; i < ${#args[@]}; i++)); do
     case "${args[i]}" in
+        --flink-home=*)
+            # Extract the value after "="
+            FLINK_HOME_VALUE="${args[i]#*=}"
+            # Check if the value is not empty
+            if [[ -n "$FLINK_HOME_VALUE" ]]; then
+                FLINK_HOME="$FLINK_HOME_VALUE"
+                echo "[INFO] Set FLINK_HOME to ${FLINK_HOME_VALUE}."
+                break
+            fi
+            ;;
         --flink-home)
             if [[ -n "${args[i+1]}" ]]; then
                 FLINK_HOME="${args[i+1]}"
+                echo "[INFO] Set FLINK_HOME to ${FLINK_HOME}."
                 break
             fi
             ;;

Reply via email to