Closed (fixed)
Project:
Drush
Version:
All-versions-4.x-dev
Component:
PM (dl, en, up ...)
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
10 Jul 2011 at 04:22 UTC
Updated:
29 Oct 2011 at 19:40 UTC
Jump to comment: Most recent file
Comments
Comment #1
greg.1.anderson commentedThis is expected behavior, although perhaps a bit unfortunate. Drush will try to download drush extensions such as drush make to the global commands directory (/usr/share/drush/commads) if it exists. If you do not have write access to this directory, then you will get the error message you reported above.
To get drush to download to some other location, you can either create $HOME/.drush (the per-user location has precedence over the global location), or run drush dl with the --destination option.
Comment #2
ergonlogicThanks for the response.
$HOME/.drush already does exist, actually.
Comment #3
greg.1.anderson commentedComment #4
greg.1.anderson commentedComment #5
ergonlogicI *think* just adding a
is_writable($install_dir)in pm_drush_pm_download_destination_alter() fixes this.Comment #6
greg.1.anderson commentedYour patch is rolled backwards, but yes, that is exactly right.
Comment #7
ergonlogicGah! Sorry about that. Rerolled.
Comment #8
greg.1.anderson commentedCommitted.
Comment #10
ergonlogicThis should be feasible to backport to the 4.x branch, no?
Also, I know it's a very small patch, but is there any way I could get author attribution (--author="ergonlogic ")?
Comment #11
greg.1.anderson commentedI know how to do that on commit, and I'm sorry I forgot. If you know the git amend command to do it retroactively, I'll do it. Can a commit be amended when it is no longer at HEAD?
Comment #12
moshe weitzman commentedYou can't amend pushed commits on drupal.org. It would break people's clones.
Comment #13
moshe weitzman commentedI should add that if you use git format-patch as advocated at http://drupal.org/node/1054616, then your attribution comes along with the patch.
Comment #14
ergonlogicThank you both. No worries for the current patch :) I'll try to use 'git format-patch' in the future.
And on the subject of a backport to 4.x? Is there something I can do to help?
Comment #15
greg.1.anderson commentedYou could check to see if your patch applied cleanly to 7.x-4.x, and re-roll if it does not.
Comment #16
ergonlogicI had rolled the patch in #7 from within the commands/pm/ directory. Here's one rolled from the drush root, and using 'git format-patch' as moshe suggested.
Comment #17
ergonlogicComment #18
greg.1.anderson commentedCommitted; thanks.