diff --git a/commands/ls.go b/commands/ls.go index 18d4a606a3..8a6d3b6d20 100644 --- a/commands/ls.go +++ b/commands/ls.go @@ -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 {