Merge pull request #1506 from ericsage/1502

Return better error for issue #1502.
This commit is contained in:
Nathan LeClaire 2015-07-13 17:33:30 -07:00
commit cd55ca0030
1 changed files with 4 additions and 0 deletions

View File

@ -1,6 +1,7 @@
package commands
import (
"errors"
"fmt"
"os"
"strings"
@ -87,6 +88,9 @@ func parseFilters(filters []string) (FilterOptions, error) {
options := FilterOptions{}
for _, f := range filters {
kv := strings.SplitN(f, "=", 2)
if len(kv) != 2 {
return options, errors.New("Unsupported filter syntax.")
}
key, value := kv[0], kv[1]
switch key {