Skip to content

Commit

Permalink
Report errors when curl fails (#533)
Browse files Browse the repository at this point in the history
* Use curl's --show-error flag

* Add changelog entry for --show-error
  • Loading branch information
joshwlewis committed Jan 3, 2024
1 parent 10b8f0a commit b9a1f17
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -2,6 +2,8 @@

## Unreleased

- Added `--show-error` flag to all curl commands

## v183 (2024-01-02)
* Add go1.20.12
* Add go1.21.5
Expand Down
4 changes: 2 additions & 2 deletions lib/common.sh
Expand Up @@ -16,7 +16,7 @@ GREEN='\033[1;32m'
YELLOW='\033[1;33m'
RED='\033[1;31m'
NC='\033[0m' # No Color
CURL="curl -s -L --fail --retry 15 --retry-delay 2 --retry-connrefused --connect-timeout 5" # retry for up to 30 seconds
CURL="curl --silent --show-error --location --fail --retry 15 --retry-delay 2 --retry-connrefused --connect-timeout 5" # retry for up to 30 seconds

if [ -z "${GO_BUCKET_URL}" ]; then
BucketURL="https://heroku-golang-prod.s3.us-east-1.amazonaws.com"
Expand Down Expand Up @@ -330,7 +330,7 @@ determineTool() {
info "Detected go modules via go.mod"
step ""
ver=${GOVERSION:-$(awk '{ if ($1 == "//" && $2 == "+heroku" && $3 == "goVersion" ) { print $4; exit } }' ${goMOD})}
ver=${ver:-$(awk '{ if ($1 == "go" ) { print "go" $2; exit } }' ${goMOD})}
ver=${ver:-$(awk '{ if ($1 == "go" ) { print "go" $2; exit } }' ${goMOD})}
name=$(awk '{ if ($1 == "module" ) { gsub(/"/, "", $2); print $2; exit } }' < ${goMOD})
info "Detected Module Name: ${name}"
step ""
Expand Down

0 comments on commit b9a1f17

Please sign in to comment.