Closed (fixed)
Project:
Drush
Version:
8.x-6.x-dev
Component:
PM (dl, en, up ...)
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
11 Mar 2013 at 04:07 UTC
Updated:
15 May 2013 at 17:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
micahw156I'm willing to take a stab at fixing this, but I might not be able to get to it until later in the week.
Comment #2
moshe weitzman commentedPing - any news?
Comment #3
micahw156Sorry, I've been sick and haven't touched a computer in almost a week.
I was able to take a few minutes and found the code that needs work in function drush_pm_extensions_in_project() around line 1720 in commands/pm/pm.drush.inc.
I'm running out the door right now, but I may have more time to look at this later tonight. Looks fairly simple to add D8 code without breaking existing reporting for older Drupal versions.
Comment #4
micahw156The attached patch provides a partial solution by modifying two calls to drush_scan_directory() from drush_pm_extensions_in_project() to accommodate for .yml extensions on info files. Since the info files are not actually read by this function, no other changes should be required for detecting and displaying modules, themes and profiles.
However, this patch brings to light a different issue in drush_scan_directory(). The name property returned by this function is expected to be a bare basename. Previous versions would return "modulename" from "modulename.info", but now it is returning "modulename.info" from "modulename.info.yml".
This results in some skewed results:
I don't know if that should be handled as a second issue, or if it should just be addressed locally here. It depends on what else this might affect, and I'm not familiar enough with drush innards to make that guess.
@moshe / maintainers:
Please advise and let me know how I should proceed. If you want, I can further modify drush_pm_extensions_in_project() to be more versatile in handling extension stripping. If you think this is better handled by updating drush_scan_directory() then I would assume that needs to become a separate issue.
Comment #5
moshe weitzman commentedWould be great if jonhattan could review this.
Comment #6
jonhattanI'll review this in detail tomorrow. For now, I think no second issue is neccesary
drush_scan_directory()should stay as it is, since it is a copy ofdrupal_scan_directory(). Probably any extra code to handle info.yml case must be in place.Comment #7
jonhattancommitting the patch attached.
Side note: drupal_scan_directory() doesn't exist. It is file_scan_directory(). Drush implements an adaptation of the drupal 6 version. At some point you could update to the drupal 8 version just to keep in sync but it neither fix the problem found here.
Comment #8
jonhattanCommitted.