This is an automated email from the ASF dual-hosted git repository. srowen pushed a commit to branch branch-3.0 in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-3.0 by this push: new 89c4b27 [SPARK-35373][BUILD][FOLLOWUP] Fix "binary operator expected" error on build/mvn 89c4b27 is described below commit 89c4b277441d962a1d6420dc30e1c00022e6c4ca Author: Yikun Jiang <yikunk...@gmail.com> AuthorDate: Thu May 20 12:25:23 2021 -0500 [SPARK-35373][BUILD][FOLLOWUP] Fix "binary operator expected" error on build/mvn ### What changes were proposed in this pull request? change $(command -v curl) to "$(command -v curl)" ### Why are the changes needed? We need change $(command -v curl) to "$(command -v curl)" to make sure it work when `curl` or `wget` is uninstall. othewise raised: `build/mvn: line 56: [: /root/spark/build/apache-maven-3.6.3-bin.tar.gz: binary operator expected` ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? ``` apt remove curl rm -f build/apache-maven-3.6.3-bin.tar.gz rm -r build/apache-maven-3.6.3-bin mvn -v ``` Closes #32608 from Yikun/patch-6. Authored-by: Yikun Jiang <yikunk...@gmail.com> Signed-off-by: Sean Owen <sro...@gmail.com> (cherry picked from commit 3c3533d845bd121a9e094ac6c17a0fb3684e269c) Signed-off-by: Sean Owen <sro...@gmail.com> --- build/mvn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/mvn b/build/mvn index d304f86..7dd805c 100755 --- a/build/mvn +++ b/build/mvn @@ -59,7 +59,7 @@ install_app() { # check if we already have the tarball # check if we have curl installed # download application - if [ ! -f "${local_tarball}" -a $(command -v curl) ]; then + if [ ! -f "${local_tarball}" -a "$(command -v curl)" ]; then echo "exec: curl ${curl_opts} ${remote_tarball}" 1>&2 curl ${curl_opts} "${remote_tarball}" > "${local_tarball}" if [ ! -z "${checksum_suffix}" ]; then @@ -68,7 +68,7 @@ install_app() { fi fi # if the file still doesn't exist, lets try `wget` and cross our fingers - if [ ! -f "${local_tarball}" -a $(command -v wget) ]; then + if [ ! -f "${local_tarball}" -a "$(command -v wget)" ]; then echo "exec: wget ${wget_opts} ${remote_tarball}" 1>&2 wget ${wget_opts} -O "${local_tarball}" "${remote_tarball}" if [ ! -z "${checksum_suffix}" ]; then --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org