function drush_pm_update

8.0.x drush_pm_update()
6.x drush_pm_update()
7.x drush_pm_update()
3.x drush_pm_update()
4.x drush_pm_update()
5.x drush_pm_update()
master drush_pm_update()

Command callback. Execute updatecode.


commands/pm/, line 904
The drush Package Manager


function drush_pm_update() {
  // Signal that we will update drush core after the drush modules
  // are updated, if an update to core is available.
  drush_set_context('DRUSH_PM_UPDATE_ALL', TRUE);

  // Call pm-updatecode.  updatedb will be called in the post-update process.
  $args = func_get_args();
  array_unshift($args, 'pm-updatecode');
  call_user_func_array('drush_invoke', $args);

  // pm-updatecode will not do a core update of Drupal
  // on the same invocation where non-core modules are
  // updated.  If there is a core update available, then
  // call pm-updatecode a second time to update core
  // (but only if the first run finished successfully).
  if (drush_get_context('DRUSH_PM_CORE_UPDATE_AVAILABLE', FALSE) && (drush_get_error() == DRUSH_SUCCESS)) {
    call_user_func_array('drush_invoke', array('pm-updatecode', 'drupal'));