Skip to content

Commit ad63dcd

Browse files
author
Damian Rouson
committed
Added more graceful exit when prerequisite download fails.
Signed-off-by: Damian Rouson <[email protected]>
1 parent 8b2ee88 commit ad63dcd

File tree

1 file changed

+12
-2
lines changed
  • install_prerequisites

1 file changed

+12
-2
lines changed

install_prerequisites/build

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,10 +287,20 @@ download_if_necessary()
287287
elif [[ "$fetch" == "git" ]]; then
288288
args=clone
289289
fi
290-
printf "Downloading $package_to_build $version_to_build.\n"
290+
download_path=${PWD}
291+
printf "Downloading $package_to_build $version_to_build to the following path:\n"
292+
printf "$download_path \n"
291293
printf "Download command: $fetch $args $url\n"
292-
$fetch $args $url
294+
$fetch $args $url
293295
if [[ $version_to_build == '--avail' || $version_to_build == '-a' ]]; then
296+
# We have what we came for. Let's move on.
297+
exit 1
298+
fi
299+
if [ -f "$url_tail" ]; then
300+
echo ""
301+
else
302+
echo "Download failed: $url_tail is not in the following, expected location:"
303+
echo "$download_path"
294304
exit 1
295305
fi
296306
fi

0 commit comments

Comments
 (0)