Skip to content

Commit

Permalink
revert install-go
Browse files Browse the repository at this point in the history
  • Loading branch information
WillAbides committed Aug 11, 2023
1 parent 709c4fe commit f98877a
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions src/install-go
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ add_to_github_path "$target_dir/bin"
PATH="$(add_to_system_path "$target_dir/bin")"
echo PATH="$PATH"

go_exec="$target_dir/bin/$(exe_name go)"

gopath=$("$go_exec" env GOPATH)
gopath=$(go env GOPATH)
mkdir -p "$gopath/bin"

add_to_github_path "$gopath/bin"
Expand All @@ -50,15 +48,14 @@ PATH="$(add_to_system_path "$gopath/bin")"
unset GOROOT

if [ -n "$INSTALL_GO_TIP" ]; then
GO111MODULE=off "$go_exec" get golang.org/dl/gotip
GO111MODULE=off go get golang.org/dl/gotip
"$gopath/bin/$(exe_name gotip)" download
rm -rf "$tip_target_dir"
mkdir -p "$(dirname "$tip_target_dir")"
mv "$(sdk_dir)/gotip" "$tip_target_dir"

add_to_github_path "$tip_target_dir/bin"
PATH="$(add_to_system_path "$tip_target_dir/bin")"
go_exec="$tip_target_dir/bin/$(exe_name go)"
fi

govars='GOCACHE
Expand All @@ -67,12 +64,8 @@ GOPATH
GOROOT
GOTOOLDIR'

echo target_dir
echo "$target_dir"
echo which go
which go
echo "GOROOT=$("$go_exec" env GOROOT)" >> "$GITHUB_ENV"
echo "GOROOT=$(go env GOROOT)" >> "$GITHUB_ENV"

for var in $govars; do
echo "$var=$("$go_exec" env "$var")" >> "$GITHUB_OUTPUT"
echo "$var=$(go env "$var")" >> "$GITHUB_OUTPUT"
done

0 comments on commit f98877a

Please sign in to comment.