exit without output on failed download
in the case the provided access token doesn't have the appropriate permissions, exit without output. Otherwise, the downloaded files will not have the expected contents.
This commit is contained in:
parent
3772ac42c9
commit
c1d31e18ab
1 changed files with 1 additions and 1 deletions
|
@ -149,7 +149,7 @@ download() {
|
|||
cd $RELEASE_DIR
|
||||
api GET repos/$REPO/releases/tags/$TAG > $TMP_DIR/assets.json
|
||||
jq --raw-output '.assets[] | "\(.name) \(.browser_download_url)"' < $TMP_DIR/assets.json | while read name url ; do
|
||||
curl -H "Authorization: token $TOKEN" -o $name -L $url
|
||||
curl --fail -H "Authorization: token $TOKEN" -o $name -L $url
|
||||
done
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue