fix: excludeDir error

This commit is contained in:
chris
2024-04-12 15:35:20 +08:00
parent 61971b251b
commit 9e880d452d
2 changed files with 2 additions and 2 deletions

View File

@@ -1,7 +1,7 @@
package config
var (
Version = "1.0.15"
Version = "1.0.16"
WireCmd = "github.com/google/wire/cmd/wire@latest"
NunuCmd = "github.com/go-nunu/nunu@latest"
RepoBase = "https://github.com/go-nunu/nunu-layout-base.git"

View File

@@ -48,7 +48,7 @@ func FindMain(base, excludeDir string) (map[string]string, error) {
return err
}
for _, s := range excludeDirArr {
if strings.HasPrefix(path, s) {
if strings.HasPrefix(strings.TrimPrefix(path, base), "/"+s) {
return nil
}
}