1
0
Fork 0
mirror of https://github.com/vbatts/git-validation.git synced 2024-11-22 16:15:40 +00:00

Merge pull request #43 from crosbymichael/exclude

Skip empty excludes
This commit is contained in:
Vincent Batts 2019-09-11 12:52:28 -04:00 committed by GitHub
commit 5b845cee79
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -108,6 +108,9 @@ func Check(commit string) ([]byte, error) {
if gitNewEnough { if gitNewEnough {
excludeList := strings.Split(excludeEnvList, ":") excludeList := strings.Split(excludeEnvList, ":")
for _, exclude := range excludeList { for _, exclude := range excludeList {
if exclude == "" {
continue
}
args = append(args, "--", ".", fmt.Sprintf(":(exclude)%s", exclude)) args = append(args, "--", ".", fmt.Sprintf(":(exclude)%s", exclude))
} }
} }