Skip to content

Commit

Permalink
Retries failed go get requests. (#229)
Browse files Browse the repository at this point in the history
Temporary solution until golang/go#28194 is fixed
in order to retry failed fetch requests.
  • Loading branch information
ser-io authored Jan 13, 2023
1 parent 8991252 commit 083b287
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions frontend/src/goutil
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ set -x
cd $1
shift


# Override these variables to make go not depend on HOME
mkdir -p /tmp/go
export GOPATH=/tmp/go
Expand All @@ -17,4 +18,13 @@ then
GOBIN=/usr/lib/go-1.13/bin/go
fi

version=`$GOBIN version | { read _ _ v _; echo ${v#go}; }`

if [[ "$version" > "1.15" ]]; then
# Temporary solution until https://github.com/golang/go/issues/28194 is fixed
# in order to retry failed fetch requests.
# GOPROXY fallback was added in Go 1.15
export GOPROXY="proxy.golang.org|proxy.golang.org|direct"
fi

$GOBIN "$@"

0 comments on commit 083b287

Please sign in to comment.