Closed (fixed)
Project:
Drush
Version:
All-Versions-2.0
Component:
Interoperability
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
4 Aug 2009 at 12:07 UTC
Updated:
14 Oct 2009 at 14:00 UTC
It's not possible to do something like this from another drush command:
drush_invoke('enable', 'ping');
This is because drush_pm_enable in pm.drush.inc isn't getting its commands from its function arguments but doing drush_get_command() -- this gets the original command the user typed in.
Comments
Comment #1
moshe weitzman commented@adrian - this is a bug, i imagine?
Comment #2
adrian commenteddrush_invoke("enable", array("ping"));
Comment #3
adrian commentedthe drush_commands should probably be removed and replaced by func_get_args();
Comment #4
moshe weitzman commenteddo you mean drush_get_command() calls should be removed?
Comment #5
joachim commentedYes -- if the idea of drush_invoke() is that any command may be simulated by code, then no command should assume it was the original typed-in command.
Comment #6
moshe weitzman commentedCommitted a fix to updatedb and enable/disable/uninstall. Thanks.