Skip to content

Commit

Permalink
fix(scripts): deploy spark correctly (#3958)
Browse files Browse the repository at this point in the history
$SPARK_HOME may be a symbolic link referring to a invalid directory, so
we'd try 'rm -f' first
  • Loading branch information
aceforeverd authored Jul 12, 2024
1 parent 9a81683 commit c2a754f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion release/sbin/deploy-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,12 @@ function download_spark {
if [[ -z "${SPARK_HOME}" ]]; then
echo "[ERROR] SPARK_HOME is not set"
else
if [[ ! -e "${SPARK_HOME}" ]]; then
if [[ ! -d "${SPARK_HOME}" ]]; then
# SPARK_HOME may be symbolic link, -d will consider only directory exists,
# this filter out existing symbolic link refer to a non-exists directory.
# And we'd try rm it first
rm -fv "${SPARK_HOME}"

echo "Downloading openmldbspark..."
spark_name=spark-3.2.1-bin-openmldbspark
spark_tar="${spark_name}".tgz
Expand Down

0 comments on commit c2a754f

Please sign in to comment.