function notify_drush_exit

8.0.x notify.drush.inc notify_drush_exit()
6.x notify.drush.inc notify_drush_exit()
7.x notify.drush.inc notify_drush_exit()

Implements hook_drush_exit().

File

commands/core/notify.drush.inc, line 48
Add system notifications as a new drush option.

Code

function notify_drush_exit() {
  $cmd = drush_get_command();
  // pm-download handles its own notification.
  if ($cmd['command'] != 'pm-download' && drush_notify_allowed($cmd['command'])) {
    $msg = dt("Command '!command' completed.", array('!command' => $cmd['command']));
    drush_notify_send(drush_notify_command_message($cmd['command'], $msg));
  }
}