If Deploy has been downloaded to a site but the module is disabled, running many drush commands (including just "drush" or "drush help") may result in the following error:

PHP Fatal error:  Call to undefined function deploy_get_auth_types() in .../sites/all/modules/deploy/includes/deploy.drush.inc on line 18
Drush command terminated abnormally due to an unrecoverable error.                                                       [error]

This is because hook_drush_command() is invoked for all modules whether they are enabled or not. The attached patch adds a module_exists() check around the offending code.

Comments

chrisnovak’s picture

Thanks longwave, this patch solved my issue.

egerlach’s picture

I have tested this patch as well and give it +1

longwave’s picture

Status: Needs review » Reviewed & tested by the community

Marking RTBC based on above comments.

fabsor’s picture

StatusFileSize
new2.17 KB

Here is a reroll of the patch.

Since I didn't add anything new, I just leave this as RTBC.

beanjammin’s picture

fabsor's re-rolled patch for #4 worked for me, thanks!

dixon_’s picture

Status: Reviewed & tested by the community » Fixed

@fabsor's patch in from #4 is committed to 6.x-1.x, nearly 2 years later... ;-) Thanks!

Will roll a new 6.x release soon.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.