In this instance, the destination of the download is the drush directory, so drush mistakenly assumes that drush is being updated. Drush is backed up to the backup directory, and the module being downloaded is used to replace drush. The result is no more drush. Oops.

Comments

kotnik’s picture

Maybe something simple as this:

-    if ($request['project_install_location'] == DRUSH_BASE_PATH) {
+    if ($request['project_install_location'] == DRUSH_BASE_PATH && $request['name'] == 'drush') {

in drush_pm_download function would do the thing?

moshe weitzman’s picture

Status: Active » Fixed

Ouch. Nasty bug. Fixed as suggested.

Status: Fixed » Closed (fixed)

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