mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
ZEPPELIN-783: add cleanup on download failure
This commit is contained in:
parent
b413743148
commit
bd1d5e22fb
1 changed files with 6 additions and 1 deletions
|
|
@ -67,7 +67,12 @@ if [[ ! -d "${SPARK_HOME}" ]]; then
|
|||
ENDTIME=`date +%s`
|
||||
DOWNLOADTIME="$((ENDTIME-STARTTIME))"
|
||||
fi
|
||||
tar zxf "${SPARK_ARCHIVE}.tgz"
|
||||
# clean-up on failure
|
||||
if ! tar zxf "${SPARK_ARCHIVE}.tgz" ; then
|
||||
echo "Unable to extract ${SPARK_ARCHIVE}.tgz" >&2
|
||||
rm -rf "${SPARK_ARCHIVE}"
|
||||
rm -f "${SPARK_ARCHIVE}.tgz"
|
||||
fi
|
||||
fi
|
||||
|
||||
set +xe
|
||||
|
|
|
|||
Loading…
Reference in a new issue