I have installed drush, created an alias to it and installed and enabled drush_extras

When I do the command line: drush pm update

It lists all my modules correctly and goes on to ask me Do you really want to continue?

However, it says drush: Aborting before I can say Y/N

Do you really want to continue? (y/n): drush: Aborting.

Comments

jerome72’s picture

same problem here.

clemens.tolboom’s picture

Category: support » bug

I just updated the drush-HEAD of March 31 and this fixed this problem.

Trouble is we now lost the update alerts which is imho _very_ bad. The new mantra for drush is 'follow the head' :(

clemens.tolboom’s picture

Component: Miscellaneous » Code
Priority: Normal » Critical

Well ... the abort is solved but now I get the following for

$ drush --verbose --uri=example.dev pm update devel
Drush bootstrap phase : _drush_bootstrap_drupal_root()                                                                          [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_site()                                                                          [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_configuration()                                                                 [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_database()                                                                      [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_full()                                                                          [bootstrap]
warning: Cannot modify header information - headers already sent by (output started at                                          [warning]
/home/clemens/usr/lib/drush/includes/drush.inc:349) in /home/clemens/projects/example/www/includes/common.inc on line 141.
Update information last refreshed: Wed, 04/01/2009 - 09:24

-snip list of modules-

Updates will be made to the following projects:
Devel [devel-6.x-1.15]

Note: Updated modules can potentially break your site. It's not recommended to update production sites without prior testing.
Note: If you have made any modifications to any file that belongs to one of these projects, you will have to migrate those modifications after updating.
Do you really want to continue? (y/n): y
Starting to update Devel ...
Calling mkdir(DRUSH_DRUPAL_ROOT/backup, 511)
Calling mkdir(DRUSH_DRUPAL_ROOT/backup/modules, 511)
Calling mkdir(DRUSH_DRUPAL_ROOT/backup/modules/20090401103523, 511)
Calling rename(DRUSH_DRUPAL_ROOT/sites/all/modules/devel, DRUSH_DRUPAL_ROOT/backup/modules/20090401103523/devel)
drush: Failed to backup project directory DRUSH_DRUPAL_ROOT/sites/all/modules/devel to DRUSH_DRUPAL_ROOT/backup/modules/20090401103523/devel

on a SVN environment where there should not be any backup :(

I really would love to get a proper release back. In this case drush-6.x-2.2 :)

clemens.tolboom’s picture

Adding a define for DRUSH_DRUPAL_ROOT same as and next to DRUPAL_ROOT

includes/environment.inc:    define('DRUPAL_ROOT', $drupal_root);
includes/environment.inc:    define('DRUSH_DRUPAL_ROOT', $drupal_root);

fixed the download failure.

I'm not sure why DRUPAL_ROOT is used so no patch.

adrian’s picture

There's no define use anymore for stuff like this.

The command needs to be updated

Fintan Darragh’s picture

Hey guys,

I'm using the very latest version of HEAD (15 Apr 09) and I continue to get this error when I run drush update:

Do you really want to continue? (y/n): drush: Aborting.

...in the middle of what looks like a promising run at an update.

-F

bradleygsmith’s picture

Fintan,

I needed this to work as well and was having the same trouble. I sorted through some code and believe I have a temporary fix. Note: the temporary fix output mkdir warnings for me the first time I ran it because I already had certain directories the update was trying to create, but when I ran it a second time to verify updates occurred, I received no mkdir warnings (or any warnings for that matter) and all modules had been updated.

Line 339 in /path/to/drush/includes/environment.inc

Change this line:
drush_set_context('DRUSH_AFFIRMATIVE', drush_get_option(array('y', 'yes'), FALSE));

to this line:
drush_set_context('DRUSH_AFFIRMATIVE', drush_get_option(array('y', 'yes'), TRUE));

then run:
drush -y update

About the change: this forces drush to agree to make the changes without confirming. The '-y' in 'drush -y update' is probably just overkill. -y should normally force any confirmations to yes (in regards to drush).

I don't have any experience creating patches yet or I would create one. As I said, this is a temporary fix, when you are finished running your update make sure to revert back to the old code:
drush_set_context('DRUSH_AFFIRMATIVE', drush_get_option(array('y', 'yes'), FALSE));

Hope this helps.

owen barton’s picture

Assigned: Unassigned » owen barton

This is caused by pm_update using drush_backend_invoke rather than drush_invoke for the updatecode operation. I have a patch to fix this, and will commit shortly (with some other fixes).

owen barton’s picture

Status: Active » Fixed

Committed this fix - please update and retest

Fintan Darragh’s picture

Hey dudes,

Yep - that's fixed it. Works an absolute treat now. Awesome work!!!

-F

Status: Fixed » Closed (fixed)

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