aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/testdata/script/mod_vendor_issue46867.txt
blob: 38ae87b44a981e145b1321b7a9a3a13a560312df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Regression test for golang.org/issue/46867:
# 'go mod vendor' on Windows attempted to open and copy
# files from directories outside of the module.

cd subdir
go mod vendor
! exists vendor/example.net/NOTICE
exists vendor/example.net/m/NOTICE

-- subdir/go.mod --
module golang.org/issue46867

go 1.17

replace example.net/m v0.1.0 => ./m

require example.net/m v0.1.0
-- subdir/issue.go --
package issue

import _ "example.net/m/n"
-- subdir/m/go.mod --
module example.net/m

go 1.17
-- subdir/m/n/n.go --
package n
-- subdir/m/NOTICE --
This notice is in module m and SHOULD be vendored.
-- subdir/NOTICE --
This notice is outside of module m and SHOULD NOT be vendored.