mirror of
https://github.com/tailscale/tailscale.git
synced 2025-12-05 04:11:59 +00:00
tool/gocross: make gocross-wrapper.sh keep multiple Go toolchains around
So it doesn't delete and re-pull when switching between branches. Updates tailscale/corp#17686 Change-Id: Iffb989781db42fcd673c5f03dbd0ce95972ede0f Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
43f4131d7a
commit
6f7e7a30e3
@@ -55,8 +55,13 @@ func readRevFile(path string) (string, error) {
|
||||
}
|
||||
|
||||
func getToolchain() (toolchainDir, gorootDir string, err error) {
|
||||
rev, err := toolchainRev()
|
||||
if err != nil {
|
||||
return "", "", err
|
||||
}
|
||||
|
||||
cache := filepath.Join(os.Getenv("HOME"), ".cache")
|
||||
toolchainDir = filepath.Join(cache, "tailscale-go")
|
||||
toolchainDir = filepath.Join(cache, "tsgo", rev)
|
||||
gorootDir = filepath.Join(toolchainDir, "gocross-goroot")
|
||||
|
||||
// You might wonder why getting the toolchain also provisions and returns a
|
||||
|
||||
Reference in New Issue
Block a user