Commit 9340781d authored by Martin Nagy's avatar Martin Nagy

Fix panic if selector uses malformed syntax

parent 1f210d49
......@@ -166,6 +166,7 @@ func (b *Builder) SelectorParam(s string) *Builder {
selector, err := labels.ParseSelector(s)
if err != nil {
b.errs = append(b.errs, fmt.Errorf("the provided selector %q is not valid: %v", s, err))
return b
}
if selector.Empty() {
return b
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment