...
1[!net:github.com] skip
2[!git] skip
3
4# Redirect git to a test-specific .gitconfig.
5# GIT_CONFIG_GLOBAL suffices for git 2.32.0 and newer.
6# For older git versions we also set $HOME.
7env GIT_CONFIG_GLOBAL=$WORK${/}home${/}gopher${/}.gitconfig
8env HOME=$WORK${/}home${/}gopher
9exec git config --global --show-origin user.name
10stdout 'Go Gopher'
11
12env GOPROXY=direct
13
14! go mod download
15stderr '^go: github\.com/golang/notexist/subdir@v0.1.0: reading github\.com/golang/notexist/subdir/go\.mod at revision subdir/v0\.1\.0: '
16
17-- go.mod --
18module test
19
20go 1.18
21
22require github.com/golang/notexist/subdir v0.1.0
23
24-- $WORK/home/gopher/.gitconfig --
25[user]
26 name = Go Gopher
27 email = gopher@golang.org
28[url "git@github.com:"]
29 insteadOf = https://github.com/
View as plain text