You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2020/06/11 13:02:01 UTC
[flink] branch master updated: [FLINK-18217][conf] Explicitly check
for empty string
This is an automated email from the ASF dual-hosted git repository.
chesnay pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/master by this push:
new 6216906 [FLINK-18217][conf] Explicitly check for empty string
6216906 is described below
commit 6216906400b4d1c0730868b1f68d2087bc70bec5
Author: Chesnay Schepler <ch...@apache.org>
AuthorDate: Thu Jun 11 15:01:28 2020 +0200
[FLINK-18217][conf] Explicitly check for empty string
* [FLINK-18217][conf] Explicitly check for empty string
* +
* ++
---
flink-dist/src/main/flink-bin/bin/config.sh | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/flink-dist/src/main/flink-bin/bin/config.sh b/flink-dist/src/main/flink-bin/bin/config.sh
index 36334a1..437fbf2 100755
--- a/flink-dist/src/main/flink-bin/bin/config.sh
+++ b/flink-dist/src/main/flink-bin/bin/config.sh
@@ -524,6 +524,11 @@ extractExecutionResults() {
execution_results=$(echo "${output}" | grep ${EXECUTION_PREFIX})
num_lines=$(echo "${execution_results}" | wc -l)
+ # explicit check for empty result, becuase if execution_results is empty, then wc returns 1
+ if [[ -z ${execution_results} ]]; then
+ echo "[ERROR] The execution result is empty." 1>&2
+ exit 1
+ fi
if [[ ${num_lines} -ne ${expected_lines} ]]; then
echo "[ERROR] The execution results has unexpected number of lines, expected: ${expected_lines}, actual: ${num_lines}." 1>&2
echo "[ERROR] An execution result line is expected following the prefix '${EXECUTION_PREFIX}'" 1>&2