You are here

function drush_lightning_core_pm_updatecode_validate in Lightning Core 8.4

Same name and namespace in other branches
  1. 8.5 lightning_core.drush.inc \drush_lightning_core_pm_updatecode_validate()
  2. 8 lightning_core.drush.inc \drush_lightning_core_pm_updatecode_validate()
  3. 8.2 lightning_core.drush.inc \drush_lightning_core_pm_updatecode_validate()
  4. 8.3 lightning_core.drush.inc \drush_lightning_core_pm_updatecode_validate()

Implements drush_hook_COMMAND_validate().

File

./lightning_core.drush.inc, line 11
Drush integration for Lightning.

Code

function drush_lightning_core_pm_updatecode_validate() {
  $lightning_path = Drupal::moduleHandler()
    ->getModule('lightning')
    ->getPath();
  $question = dt('Updating code with Drush can potentially break your Lightning site. (See @path for safe update instructions.) Are you SURE you want to continue?', [
    '@path' => Drupal::root() . "/{$lightning_path}/UPDATE.md",
  ]);
  return drush_confirm($question);
}