mirror of
https://github.com/vbatts/git-validation.git
synced 2024-12-26 23:46:30 +00:00
Skip empty excludes
This is useful when you want to append additional elements to the env var in the fasion of `PATH=$PATH:/things`. Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
parent
e7e08e6b9b
commit
efe06dd0d3
1 changed files with 3 additions and 0 deletions
|
@ -108,6 +108,9 @@ func Check(commit string) ([]byte, error) {
|
|||
if gitNewEnough {
|
||||
excludeList := strings.Split(excludeEnvList, ":")
|
||||
for _, exclude := range excludeList {
|
||||
if exclude == "" {
|
||||
continue
|
||||
}
|
||||
args = append(args, "--", ".", fmt.Sprintf(":(exclude)%s", exclude))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue