Problem/Motivation

Add support for Drush Output Formats to features-list. e.g. drush --format=json features-list

http://www.drush.org/en/master/output-formats/

My main use case is a Jenkins job that needs to preg_match for 'overridden' and fail a build if it detects overridden features on a fresh install of a distribution. Currently for whatever reason it puts "overr" /n "idden" on two lines. Output format would solve this.

Proposed resolution

See below patch.

Remaining tasks

User interface changes

API changes

Data model changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Elijah Lynn created an issue. See original summary.

Elijah Lynn’s picture

Here is a rough patch, seems to work fine for my needs. Not sure if this is the correct way to do it but modeled after this patch in the Hacked issue queue #2570533: Support drush output formats (JSON, CSV etc). I also set the --pipe option to default to CSV format.

Elijah Lynn’s picture

Oh, sorry, also added in some code cleanup, couldn't help myself. Stayed relevant to the functions at hand though. Didn't venture outside of that.

Elijah Lynn’s picture

Issue summary: View changes
Status: Active » Needs work
FileSize
63.56 KB

Needs work, the row numbers are printing at the top, not sure why yet.

Elijah Lynn’s picture

Status: Needs work » Needs review
FileSize
2.79 KB

K, works now, the Table column names needed to be keys in each row.

ericduran’s picture

Status: Needs review » Reviewed & tested by the community

:thumbsup: Works nicely

Elijah Lynn’s picture

mpotter’s picture

Status: Reviewed & tested by the community » Needs work

So this patch conflicts with #2340841: Add a --pipe option to drush features-list. Since that patch was committed, this issue patch needs to be re-rolled to account for those changes.