We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b1ec230 commit 87342b4Copy full SHA for 87342b4
tasks/download.sh
@@ -38,13 +38,13 @@ download() {
38
printf '%s\n' "Downloading: ${1}"
39
tmp_file=$(mktemp "peadm-download.XXX")
40
echo "Temporary file created at: ${tmp_file}"
41
- download_file=$(curl -s -f -L -o ${tmp_file} "$1")
42
- if [[ -z "$download_file" ]]; then
+
+ if curl -s -f -L -o ${tmp_file} "$1"; then
43
mv "${tmp_file}" "$2"
44
return 0
45
else
46
echo "Error: Curl has failed to download the file"
47
- echo "|_ Removing temporary file: ${tmp_file}"
+ echo "Removing temporary file: ${tmp_file}"
48
rm "${tmp_file}"
49
return 1
50
fi
0 commit comments