You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am parsing the output of drush pmi --format=csv with certain fields enabled: --fields=extension,version,path,status. All is fine unless one of the fields is missing in the module, e.g. version.
When displaying output in another format, it may be acceptable to simply delete the information if it doesn't exist, but in CSV, that's not ok. A blank entry must be output or else all of the fields after it on that line are thrown off.
As an example, here's drush's output for argfilters, a sandbox project at http://drupalcode.org/sandbox/itangalo/1086472.git. It's .info file has no version, and drush pmi doesn't (normally) really care:
$ drush pmi argfilters
Extension : argfilters
Project : Unknown
Type : module
Title : Views arguments in filters
Description : Allows you to use argument values in filters, thereby
leveraging functionality such as operators.
Date :
Package : Experimental
Core : 7.x
PHP : 5.2.4
Status : enabled
Path : sites/all/modules/contrib/views_arguments_in_filters
Schema : module has no schema
version
Files : none
Requires : views
Required by : autocompleteinator, autocompleteinator_helper,
more_custom_modules_here
Permissions : none
Configure : None
version is just shown as empty, above, but with --format-csv, it doesn't work; it simply removes the entire field, instead of (correctly) adding a blank field:
Sorry this was never fixed in the pre-Drush-9 output format engine, which is now in maintenance only. Drush 9 + output formatters should do this correctly.
Hello,
I am parsing the output of drush pmi --format=csv with certain fields enabled: --fields=extension,version,path,status. All is fine unless one of the fields is missing in the module, e.g. version.
When displaying output in another format, it may be acceptable to simply delete the information if it doesn't exist, but in CSV, that's not ok. A blank entry must be output or else all of the fields after it on that line are thrown off.
As an example, here's drush's output for argfilters, a sandbox project at http://drupalcode.org/sandbox/itangalo/1086472.git. It's .info file has no version, and drush pmi doesn't (normally) really care:
version is just shown as empty, above, but with --format-csv, it doesn't work; it simply removes the entire field, instead of (correctly) adding a blank field:
Four fields were requested, three were returned. i can't (easily) parse this.
Please fix! This is in 6.2.0.
The text was updated successfully, but these errors were encountered: