Skip to content

Commit

Permalink
Merge pull request moby#16511 from Mashimiao/fix-logic-client-search
Browse files Browse the repository at this point in the history
client/search: small logic fix
  • Loading branch information
estesp committed Sep 24, 2015
2 parents 23750fb + 19613fe commit a7e8f36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/client/search.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func (cli *DockerCli) CmdSearch(args ...string) error {
w := tabwriter.NewWriter(cli.out, 10, 1, 3, ' ', 0)
fmt.Fprintf(w, "NAME\tDESCRIPTION\tSTARS\tOFFICIAL\tAUTOMATED\n")
for _, res := range results {
if ((*automated || *trusted) && (!res.IsTrusted && !res.IsAutomated)) || (int(*stars) > res.StarCount) {
if (*automated && !res.IsAutomated) || (int(*stars) > res.StarCount) || (*trusted && !res.IsTrusted) {
continue
}
desc := strings.Replace(res.Description, "\n", " ", -1)
Expand Down

0 comments on commit a7e8f36

Please sign in to comment.