modules: Make ignoreVendor a glob pattern

Fixes #7642
This commit is contained in:
Bjørn Erik Pedersen 2020-09-09 16:51:13 +02:00
parent 84adecf97b
commit 9a1e6d15a3
9 changed files with 124 additions and 83 deletions

View file

@ -17,6 +17,8 @@ import (
"bytes"
"testing"
"github.com/gohugoio/hugo/hugofs/glob"
"github.com/gohugoio/hugo/common/hugo"
"github.com/gohugoio/hugo/htesting"
@ -89,7 +91,7 @@ project github.com/gohugoio/hugoTestModules1_darwin/modh2_2_2@v1.3.0+vendor
Fs: hugofs.Os,
WorkingDir: workingDir,
ModuleConfig: modConfig,
IgnoreVendor: true,
IgnoreVendor: globAll,
})
graphb.Reset()
@ -101,6 +103,8 @@ project github.com/gohugoio/hugoTestModules1_darwin/modh2_2_2@v1.3.0+vendor
}
var globAll, _ = glob.GetGlob("**")
func TestGetModlineSplitter(t *testing.T) {
c := qt.New(t)