Change record status: 
Project: 
Introduced in branch: 
master
Introduced in version: 
7.x-5.0
Description: 

Previously, drush_invoke would fail if called with a command that had a 'callback' function. Now, drush_invoke calls through to drush_dispatch, which insures that the 'callback' function will be respected, and command-specific options will be set if applicable to the command.

In most cases, it should be possible to continue using drush_invoke the same way it was used in the past. There may be subtle issues introduced for some contrib Drush commands due to slight differences in the handling of commands through drush_dispatch vs. drush_invoke. For example, command-specific options for the invoked subcommand may now pollute the environment of the calling command. While it is unlikely that any of these changes will cause problems, if they do, the caller may switch to using drush_invoke_process instead.

Impacts: 
Module developers