Skip to content

Commit

Permalink
Retries failed go get requests.
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 committed Jan 13, 2023
1 parent f807b6a commit b2d8109
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 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 @@ -15,6 +16,11 @@ GOBIN=go
if ! command -v go &> /dev/null
then
GOBIN=/usr/lib/go-1.13/bin/go
else
# 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 b2d8109

Please sign in to comment.