Closed (fixed)
Project:
Drush
Version:
8.x-6.x-dev
Component:
Base system (internal API)
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
29 Jun 2013 at 19:34 UTC
Updated:
29 Jul 2013 at 14:11 UTC
Jump to comment: Most recent file
Comments
Comment #1
moshe weitzman commentedOne quick solution would be for us to add an alter hook in our invoke_all function.
Comment #2
ergonlogicSee the attached patch for a basic implementation. Is this what you had in mind? It allows things like:
I haven't tested it in my use-case yet, but I think it should work.
Comment #3
moshe weitzman commentedYes that what I had in mind. Thanks.
Comment #4
ergonlogicSame patch with docs. I'm not sure if/how we can write an automated test for a hook like this. Any suggestions?
Comment #5
moshe weitzman commentedDoes this line need a '@' before $modules? -
+function hook_drush_invoke_alter($modules, $hook) {. Seems like the example implementation needs a reference to $modulesComment #6
ergonlogic'@' would suppress errors, no? I don't understand why we'd need that. If you meant '&', then I think we could add one for clarity. But I believe the way drush_invoke_all_ref() works actually makes it unnecessary. It certainly works without it.
Comment #7
moshe weitzman commentedYes, I meant &. Sorry about that. We can omit it. Committed.