wp-cli / role-command

Adds, removes, lists, and resets roles and capabilities.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

wp user list-caps 1 --format=csv returns default list format instead of csv

theodejager opened this issue · comments

When using the command wp user list-caps and specifiying the output format as csv, the returned value is not a csv. All other output formats (--format=list, --format=table, --format=json, --format=count, --format=yaml) do produce the correct output.

Steps to reproduce:

  1. Run command wp user list-caps 1 --format=csv
  2. Observe output is not csv but default list.

A candidate for good-first-issue ?

Also Hi Theo 👋

From my testing, the output looks correct. It starts with the first row being the column name(s), and then the following rows being the individual entries. However, what might be misleading is that the output only contains a single column. So there is no difference between a CSV output and a single list output with header row.

Closing this as a non-issue. Please feel free to reopen if you think I missed something here.