Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 9ca2474

Browse files
fhsBryan C. Mills
authored and
Bryan C. Mills
committed
cmd/go: fix mod_gomodcache and generate_env TestScripts on Plan 9
Adjust these two tests for Plan 9, which uses $path instead of $PATH, and $home instead of $HOME. Fixes #39599 Change-Id: Idba95e07d307e76f0f61acd904905b417c52d43a Reviewed-on: https://go-review.googlesource.com/c/go/+/237941 Reviewed-by: Bryan C. Mills <bcmills@google.com> Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
1 parent 844bf11 commit 9ca2474

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

‎src/cmd/go/testdata/script/generate_env.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Install an env command because Windows and plan9 don't have it.
22
env GOBIN=$WORK/tmp/bin
33
go install env.go
4-
env PATH=$GOBIN${:}$PATH
4+
[plan9] env path=$GOBIN${:}$path
5+
[!plan9] env PATH=$GOBIN${:}$PATH
56

67
# Test generators have access to the environment
78
go generate ./printenv.go

‎src/cmd/go/testdata/script/mod_gomodcache.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ grep '{"Version":"v1.0.0","Time":"2018年02月14日T00:45:20Z"}' $GOPATH/pkg/mod/cache/
2424

2525
# If neither GOMODCACHE or GOPATH are set, GOPATH defaults to the user's $HOME/go, so GOMODCACHE becomes $HOME/go/pkg/mod
2626
[windows] env USERPROFILE=$WORK/home # Ensure USERPROFILE is a valid path (rather than /no-home/ so we don't run into the logic that "uninfers" GOPATH in cmd/go/main.go
27-
[!windows] env HOME=$WORK/home
27+
[plan9] env home=$WORK/home
28+
[!windows] [!plan9] env HOME=$WORK/home
2829
env GOMODCACHE=
2930
env GOPATH=
3031
go env GOMODCACHE

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /