Return better error for issue #1502.

Signed-off-by: Eric Sage <eric.david.sage@gmail.com>
This commit is contained in:
Eric Sage
2015-07-11 00:49:59 -04:00
parent 1fceba1554
commit 8a77935cd4
+3
View File
@@ -87,6 +87,9 @@ func parseFilters(filters []string) (FilterOptions, error) {
options := FilterOptions{}
for _, f := range filters {
kv := strings.SplitN(f, "=", 2)
if len(kv) != 2 {
return options, fmt.Errorf("Unupported filter syntax, please use help ls for details on correct usage.")
}
key, value := kv[0], kv[1]
switch key {