Right now, this hook is fairly useless as it's only passed the drush command arguments not the actual command so often there's no way of knowing what drush command was just run.

Comments

kyle_mathews’s picture

StatusFileSize
new510 bytes

And a patch.

kyle_mathews’s picture

Second try. Just want the command name.

greg.1.anderson’s picture

Version: 7.x-5.x-dev » 8.x-6.x-dev
Status: Active » Needs work

a.) If we are going to do this, we should pass the entire command record, not just the command name.

b.) Please roll patch against Drush 8.x-6.x.

c.) It does not look like you are calling call_user_func_array correctly.

d.) Needs a unit test that shows that the hook is working correctly, and has access to $command.

I searched all of the Drush extensions and Drupal modules I had on my system, and only admin_menu implemented hook_drush_exit, and it ignores the parameters. I am therefore not too worried about the backwards compatibility issues of changing the function parameters. Still, this does change the behavior of an API, and therefore is not eligible for backporting to Drush-5.x.

kyle_mathews’s picture

Version: 8.x-6.x-dev » 7.x-5.x-dev
Status: Needs work » Active
StatusFileSize
new502 bytes

Third try. call_user_function_array only takes two arguments.

greg.1.anderson’s picture

Version: 7.x-5.x-dev » 8.x-6.x-dev
Status: Active » Needs work

Thanks for working on this. See #3, less item c.

greg.1.anderson’s picture

Status: Needs work » Closed (won't fix)
Issue tags: +Needs migration

This issue was marked closed (won't fix) because Drush has moved to Github.

If this feature is still desired, you may copy it to our Github project. For best results, create a Pull Request that has been updated for the master branch. Post a link here to the PR, and please also change the status of this issue to closed (duplicate).

Please ask support questions on Drupal Answers.

greg.1.anderson’s picture

Issue summary: View changes

Improve clarity