Scenario: Multi site drupal setup where junior developers only have write access to the site directory of the site they are working on and do NOT have write access to the drupal base directory.

Try:
drush dl someproject

Problem:
drush dl someproject
Unable to download someproject -6.x-1.2.tar.gz to /tmp/drush_tmp_1314613864 from http://ftp.drupal.org/files/projects/someproject-6.x-1.2.tar.gz

Investigation:
By adding some debug code in wget.inc I found it tries to download the file to the drupal base directory instead of the tmp directory it is claiming to be downloading to.

Solution:
Add line in wget.inc in function package_handler_download_project(&$request, $release):

chdir($request['base_project_path']);

Then it actually tries to download to the requested /tmp/drush_tmp_???? directory as intended.

CommentFileSizeAuthor
#2 drush-1263124.patch622 bytesasciikewl

Comments

omega8cc’s picture

asciikewl’s picture

StatusFileSize
new622 bytes

Got git running for drush, so here is a nice git patch based on branch 7.x-4.x

omega8cc’s picture

Status: Active » Needs review

Thanks!

This needs review.

robertb24’s picture

I tried the patch but am getting :

Hunk #1 FAILED at 33.

I have since reverted to Drush 4.4

greg.1.anderson’s picture

Status: Needs review » Closed (duplicate)
crashtest_’s picture

I case anyone else STILL has this problem after these fixes, as I did, you may be using MAMP. I was able to get things moving by installing wget (using HomeBrew, brew install wget) then everything Just Worked (tm).

psegarel’s picture

If you're using Homebrew, brew update fixed the issue for me