blob: fa22e1808b76cf680db16dbcaf9cc02c4c05a578 [file] [log] [blame]
# Unknown lines should be ignored in dependency go.mod files.
go list -m -mod=mod all
# ... and in replaced dependency go.mod files.
cp go.mod go.mod.usesub
go list -m -mod=mod all
# ... but not in the main module.
cp go.mod.bad go.mod
! go list -m -mod=mod all
stderr 'unknown directive: hello'
-- go.mod --
module m
require rsc.io/badmod v1.0.0
-- go.mod.bad --
module m
hello world
-- go.mod.usesub --
module m
require rsc.io/badmod v1.0.0
replace rsc.io/badmod v1.0.0 => ./sub
-- sub/go.mod --
module sub
hello world