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

kirs pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-seatunnel.git


The following commit(s) were added to refs/heads/dev by this push:
     new d601179  [Feature][Scripts] Throw exception in start scripts when 
config file not exist (#1469)
d601179 is described below

commit d601179945f9e5ff4c76d7b0e414f99eaeba2931
Author: Simon <[email protected]>
AuthorDate: Mon Mar 14 17:45:54 2022 +0800

    [Feature][Scripts] Throw exception in start scripts when config file not 
exist (#1469)
---
 bin/start-seatunnel-sql.sh                                             | 3 +++
 .../seatunnel-core-flink/src/main/bin/start-seatunnel-flink.sh         | 3 +++
 .../seatunnel-core-spark/src/main/bin/start-seatunnel-spark.sh         | 3 +++
 3 files changed, 9 insertions(+)

diff --git a/bin/start-seatunnel-sql.sh b/bin/start-seatunnel-sql.sh
index 915016a..1d4de62 100755
--- a/bin/start-seatunnel-sql.sh
+++ b/bin/start-seatunnel-sql.sh
@@ -68,6 +68,9 @@ if [ -z ${CONFIG_FILE} ]; then
   echo "Error: The following option is required: [-c | --config]"
   usage
   exit -1
+elif [ ! -f ${CONFIG_FILE} ];then
+  echo "Error: Config file ${CONFIG_FILE} does not exists! Please check it."
+  exit -1
 fi
 
 # set positional arguments in their proper place
diff --git 
a/seatunnel-core/seatunnel-core-flink/src/main/bin/start-seatunnel-flink.sh 
b/seatunnel-core/seatunnel-core-flink/src/main/bin/start-seatunnel-flink.sh
index f5a3d65..f3fb8a9 100755
--- a/seatunnel-core/seatunnel-core-flink/src/main/bin/start-seatunnel-flink.sh
+++ b/seatunnel-core/seatunnel-core-flink/src/main/bin/start-seatunnel-flink.sh
@@ -68,6 +68,9 @@ if [ -z ${CONFIG_FILE} ]; then
   echo "Error: The following option is required: [-c | --config]"
   usage
   exit -1
+elif [ ! -f ${CONFIG_FILE} ];then
+  echo "Error: Config file ${CONFIG_FILE} does not exists! Please check it."
+  exit -1
 fi
 
 # set positional arguments in their proper place
diff --git 
a/seatunnel-core/seatunnel-core-spark/src/main/bin/start-seatunnel-spark.sh 
b/seatunnel-core/seatunnel-core-spark/src/main/bin/start-seatunnel-spark.sh
index d5ee1f5..ec2f78b 100755
--- a/seatunnel-core/seatunnel-core-spark/src/main/bin/start-seatunnel-spark.sh
+++ b/seatunnel-core/seatunnel-core-spark/src/main/bin/start-seatunnel-spark.sh
@@ -92,6 +92,9 @@ if [ -z ${MASTER} ] || [ -z ${DEPLOY_MODE} ] || [ -z 
${CONFIG_FILE} ]; then
   echo "Error: The following options are required: [-e | --deploy-mode], [-m | 
--master], [-c | --config]"
   usage
   exit -1
+elif [ ! -f ${CONFIG_FILE} ];then
+  echo "Error: Config file ${CONFIG_FILE} does not exists! Please check it."
+  exit -1
 fi
 
 # set positional arguments in their proper place

Reply via email to