You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by GitBox <gi...@apache.org> on 2022/04/10 06:22:43 UTC

[GitHub] [incubator-seatunnel] kezhenxu94 commented on a diff in pull request #1585: [Improve] [core] Simplify the check logic of directory

kezhenxu94 commented on code in PR #1585:
URL: https://github.com/apache/incubator-seatunnel/pull/1585#discussion_r846721598


##########
seatunnel-core/seatunnel-core-spark/src/main/bin/start-seatunnel-spark.sh:
##########
@@ -174,7 +174,7 @@ echo "[INFO] spark conf: ${sparkconf}"
 driverJavaOpts=""
 executorJavaOpts=""
 clientModeDriverJavaOpts=""
-if [ ! -z "${variables_substitution}" ]; then
+if [ -n "${variables_substitution}" ]; then

Review Comment:
   `! -z` and `-n` are not equivalent.
   
   Try this
   
   ```shell
   foo="";
   [ -n "$foo" ] && echo "foo is not null"
   [ -z "$foo" ] && echo "foo is null"
   ```
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org