mirror of
https://github.com/archlinux/archiso.git
synced 2024-09-19 11:40:19 -06:00
.automated_script.sh: add proper HTTP status checking
When a download attempt fails with an HTTP error, the body of the failed request will be written to the output file with a 0 exit status, causing the execution of an error message as a script. This issue is resolved by adding the --fail option to curl. Co-authored-by: David Runge <dvzrv@archlinux.org>
This commit is contained in:
parent
4b709bcd5f
commit
75e57093e6
2 changed files with 3 additions and 1 deletions
|
@ -17,6 +17,8 @@ Deprecated
|
|||
Fixed
|
||||
-----
|
||||
|
||||
- When downloading an automation script fail with non-zero status code instead of returning an HTML document when the remote HTTP server fails to deliver the document.
|
||||
|
||||
Removed
|
||||
-------
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ automated_script() {
|
|||
sleep 1
|
||||
done
|
||||
printf '%s: downloading %s\n' "$0" "${script}"
|
||||
curl "${script}" --location --retry-connrefused --retry 10 -s -o /tmp/startup_script
|
||||
curl "${script}" --location --retry-connrefused --retry 10 --fail -s -o /tmp/startup_script
|
||||
rt=$?
|
||||
else
|
||||
cp "${script}" /tmp/startup_script
|
||||
|
|
Loading…
Reference in a new issue