Skip to content

Commit b0203fa

Browse files
authored
Fail install command if download extraction errors out (#237)
1 parent 2f3b6bd commit b0203fa

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

bin/functions

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,11 @@ function install {
176176
;;
177177
esac
178178

179+
if [ $? -ne 0 ]; then
180+
echo "Failed to extract ${package_filename}"
181+
exit 1
182+
fi
183+
179184
read -r -a dirs <<<"$(ls -d ./*/)"
180185
cd "${dirs[0]}" || return 1
181186
if [ ! -d "${ASDF_INSTALL_PATH}" ]; then

0 commit comments

Comments
 (0)