Skip to content

drush updb does not respect hook_requirements #1427

Description

@czigor

On drush 7.0.0 and drupal 7 I have a module A with a hook_update_N() enabling a module B. Both enabling module B and running the rest of the updates are crucial for the further operation of module A so I created a hook_requirements checking if module B can be enabled (i.e. the module_enable() returns FALSE or not). However, running 'drush updb' ignores hook_requirements(). (Running updates from a browser does not.)

The problem is that update_check_requirements() in commands/core/drupal/update_7.inc explicitly states:
// Check the system module and update.php requirements only.

Is this by design? If so, what is the recommended way to run such updates with drush?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions