Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
#5 | features-drush-output-format-features-list-2608816-5-7.x-2.7.patch | 2.79 KB | Elijah Lynn |
#4 | Selection_519.png | 63.56 KB | Elijah Lynn |
#2 | Selection_517.png | 270.34 KB | Elijah Lynn |
#2 | Selection_518.png | 46.5 KB | Elijah Lynn |
#2 | features-drush-output-format-features-list-2608816-1-7.x.patch | 2.08 KB | Elijah Lynn |
Comments
Comment #2
Elijah LynnHere 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.
Comment #3
Elijah LynnOh, 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.
Comment #4
Elijah LynnNeeds work, the row numbers are printing at the top, not sure why yet.
Comment #5
Elijah LynnK, works now, the Table column names needed to be keys in each row.
Comment #6
ericduran CreditAttribution: ericduran at NBCUniversal commented:thumbsup: Works nicely
Comment #7
Elijah LynnComment #8
mpotter CreditAttribution: mpotter at Phase2 commentedSo 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.