...

Text file src/cmd/go/testdata/script/mod_vendor_issue46867.txt

Documentation: cmd/go/testdata/script

     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
     5cd subdir
     6go mod vendor
     7! exists vendor/example.net/NOTICE
     8exists vendor/example.net/m/NOTICE
     9
    10-- subdir/go.mod --
    11module golang.org/issue46867
    12
    13go 1.17
    14
    15replace example.net/m v0.1.0 => ./m
    16
    17require example.net/m v0.1.0
    18-- subdir/issue.go --
    19package issue
    20
    21import _ "example.net/m/n"
    22-- subdir/m/go.mod --
    23module example.net/m
    24
    25go 1.17
    26-- subdir/m/n/n.go --
    27package n
    28-- subdir/m/NOTICE --
    29This notice is in module m and SHOULD be vendored.
    30-- subdir/NOTICE --
    31This notice is outside of module m and SHOULD NOT be vendored.

View as plain text