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.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | drush-1263124.patch | 622 bytes | asciikewl |
Comments
Comment #1
omega8cc commentedThis trick fixes the (duplicate) issue #1270724: Drush should not require write permissions on site directory.
Comment #2
asciikewl commentedGot git running for drush, so here is a nice git patch based on branch 7.x-4.x
Comment #3
omega8cc commentedThanks!
This needs review.
Comment #4
robertb24 commentedI tried the patch but am getting :
Hunk #1 FAILED at 33.
I have since reverted to Drush 4.4
Comment #5
greg.1.anderson commentedThis is a duplicate of #1272820: pm-download isn't using the directory stipulated in $request['base_project_path']
Comment #6
crashtest_ commentedI 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).
Comment #7
psegarel commentedIf you're using Homebrew,
brew updatefixed the issue for me