Skip to content

Commit efe06dd

Browse files
committed
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 <[email protected]>
1 parent e7e08e6 commit efe06dd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

git/commits.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ func Check(commit string) ([]byte, error) {
108108
if gitNewEnough {
109109
excludeList := strings.Split(excludeEnvList, ":")
110110
for _, exclude := range excludeList {
111+
if exclude == "" {
112+
continue
113+
}
111114
args = append(args, "--", ".", fmt.Sprintf(":(exclude)%s", exclude))
112115
}
113116
}

0 commit comments

Comments
 (0)