fix: rm -rf the base-image GOROOT before extract — overlaying two Go versions corrupts the stdlib (duplicate declarations)
This commit is contained in:
@@ -16,6 +16,7 @@ runs:
|
||||
aarch64|arm64) arch=arm64 ;;
|
||||
*) echo "better-setup-go: unsupported arch $(uname -m)" >&2; exit 1 ;;
|
||||
esac
|
||||
rm -rf /usr/local/go # a base-image GOROOT under the same path corrupts on overlay
|
||||
curl -fsSL "https://go.dev/dl/go${v}.linux-${arch}.tar.gz" | tar -xz -C /usr/local
|
||||
ln -sf /usr/local/go/bin/go /usr/local/bin/go
|
||||
ln -sf /usr/local/go/bin/gofmt /usr/local/bin/gofmt
|
||||
|
||||
Reference in New Issue
Block a user