Skip to content

Commit 602cc18

Browse files
committed
fix test
1 parent 8cc4254 commit 602cc18

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

patches/0011-Set-ms-go-build-as-default-GOCACHE.patch

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ Subject: [PATCH] Set ms-go-build as default GOCACHE
66
Use a Microsoft-specific directory for Go build cache to avoid conflicts
77
with other Go toolchains.
88
---
9-
src/cmd/go/internal/cache/default.go | 2 +-
10-
src/cmd/go/testdata/script/cache_unix.txt | 4 ++--
11-
2 files changed, 3 insertions(+), 3 deletions(-)
9+
src/cmd/go/internal/cache/default.go | 2 +-
10+
src/cmd/go/testdata/script/cache_unix.txt | 4 ++--
11+
src/cmd/go/testdata/script/env_changed.txt | 2 +-
12+
3 files changed, 4 insertions(+), 4 deletions(-)
1213

1314
diff --git a/src/cmd/go/internal/cache/default.go b/src/cmd/go/internal/cache/default.go
1415
index cc4e0517b4a12d..442d7a5dd634df 100644
@@ -42,3 +43,16 @@ index e11804d39abebd..a1a088884a174c 100644
4243

4344
# With no guidance from the environment, we must disable the cache, but that
4445
# should not cause commands that do not write to the cache to fail.
46+
diff --git a/src/cmd/go/testdata/script/env_changed.txt b/src/cmd/go/testdata/script/env_changed.txt
47+
index da9560062704e6..fda4a1354dad82 100644
48+
--- a/src/cmd/go/testdata/script/env_changed.txt
49+
+++ b/src/cmd/go/testdata/script/env_changed.txt
50+
@@ -74,7 +74,7 @@ go env -changed
51+
! stdout 'GOTOOLCHAIN=''?local''?'
52+
53+
[GOOS:windows] env LocalAppData=C:\
54+
-[GOOS:windows] env GOCACHE=C:\go-build
55+
+[GOOS:windows] env GOCACHE=C:\ms-go-build
56+
[GOOS:windows] go env -changed
57+
[GOOS:windows] ! stdout 'GOCACHE'
58+

0 commit comments

Comments
 (0)