1 # Regression test for golang.org/issue/46867:
2 # 'go mod vendor' on Windows attempted to open and copy
3 # files from directories outside of the module.
4
5 cd subdir
6 go mod vendor
7 ! exists vendor/example.net/NOTICE
8 exists vendor/example.net/m/NOTICE
9
10 -- subdir/go.mod --
11 module golang.org/issue46867
12
13 go 1.17
14
15 replace example.net/m v0.1.0 => ./m
16
17 require example.net/m v0.1.0
18 -- subdir/issue.go --
19 package issue
20
21 import _ "example.net/m/n"
22 -- subdir/m/go.mod --
23 module example.net/m
24
25 go 1.17
26 -- subdir/m/n/n.go --
27 package n
28 -- subdir/m/NOTICE --
29 This notice is in module m and SHOULD be vendored.
30 -- subdir/NOTICE --
31 This notice is outside of module m and SHOULD NOT be vendored.
32
View as plain text