Not to mention regexps, and testing.
This commit is contained in:
parent
64cfebc63c
commit
012423338e
2
build.go
2
build.go
@ -543,7 +543,7 @@ func getBranchSuffix() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
validBranchRe := regexp.MustCompile(`^[a-zA-Z0-9_.-]$`)
|
validBranchRe := regexp.MustCompile(`^[a-zA-Z0-9_.-]+$`)
|
||||||
if !validBranchRe.MatchString(branch) {
|
if !validBranchRe.MatchString(branch) {
|
||||||
// There's some odd stuff in the branch name. Better skip it.
|
// There's some odd stuff in the branch name. Better skip it.
|
||||||
return ""
|
return ""
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user