zrhoffman commented on a change in pull request #5229:
URL: https://github.com/apache/trafficcontrol/pull/5229#discussion_r515674778



##########
File path: .github/actions/go-test/entrypoint.sh
##########
@@ -19,27 +19,53 @@
 set -e
 
 download_go() {
+       . build/functions.sh
+       if verify_and_set_go_version; then
+               return
+       fi
        go_version="$(cat "${GITHUB_WORKSPACE}/GO_VERSION")"
        wget -O go.tar.gz 
"https://dl.google.com/go/go${go_version}.linux-amd64.tar.gz";
-       tar -C /usr/local -xzf go.tar.gz
+       echo "Extracting Go ${go_version}..."
+       <<-'SUDO_COMMANDS' sudo sh
+               set -o errexit
+               go_dir="$(
+                       dirname "$(

Review comment:
       It would, but 679bf31754 removes this part.

##########
File path: .github/actions/go-test/entrypoint.sh
##########
@@ -19,27 +19,53 @@
 set -e
 
 download_go() {
+       . build/functions.sh
+       if verify_and_set_go_version; then
+               return
+       fi
        go_version="$(cat "${GITHUB_WORKSPACE}/GO_VERSION")"
        wget -O go.tar.gz 
"https://dl.google.com/go/go${go_version}.linux-amd64.tar.gz";
-       tar -C /usr/local -xzf go.tar.gz
+       echo "Extracting Go ${go_version}..."
+       <<-'SUDO_COMMANDS' sudo sh
+               set -o errexit
+               go_dir="$(
+                       dirname "$(
+                               dirname "$(
+                                       realpath "$(
+                                               which go
+                                               )")")")"
+               mv "$go_dir" "${go_dir}.unused"
+               tar -C /usr/local -xzf go.tar.gz
+       SUDO_COMMANDS
        rm go.tar.gz
        export PATH="${PATH}:${GOROOT}/bin"
        go version
 }
+
+GOROOT=/usr/local/go
+export GOROOT PATH="${PATH}:${GOROOT}/bin"
 download_go
 
 if [ -z "$INPUT_DIR" ]; then
        # There's a bug in "defaults" for inputs
        INPUT_DIR="./lib/..."
 fi
 
-export GOPATH="$(mktemp -d)"
-srcdir="$GOPATH/src/github.com/apache"
-mkdir -p "$srcdir"
-ln -s "$PWD" "$srcdir/trafficcontrol"
-cd "$srcdir/trafficcontrol"
+GOROOT=/usr/local/go
+export GOROOT PATH="${PATH}:${GOROOT}/bin"

Review comment:
       These additions are gone as of 679bf31754.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to