2

I am new with Drush and git... previously I use to work with Ftp so at the moment I would like to know How I can update a common library by using drush or by using git (library url).

I know that in order to update a module I can use: drush up module_name How about for libraries?

I tried to do the same for libraries but it did not work.... I know some libraries have their own drush command for download it like is the case of chosen library:

drush chosenplugin

however I have in my local machine a Drupal profile that I am all the time updating it so the profile of course has not sites/all/libraries but has profiles/libraries/ the problem in this case is that when running drush chosenplugin the console shows up:

Unable to unzip chosen_v1.1.0.zip   error

and I think it shows that error because according to the chosen module/library drupal site information https://www.drupal.org/project/chosen what the drush chosenplugin does is:

The command will download the plugin and unpack it in "sites/all/libraries". It is possible to add another path as an option to the command, but not recommended unless you know what you are doing.

So of course in this case I dont have sites/all/libraries and that´s why I think the command is not getting success with the download/update?

Is there a way how to add another path? how to add it in order my chosen library gets updated in the path profiles/libraries/.

Please keep in mind that I have already a chosen library version v0.9.1 installed and now what I want is to update it to the last version which one is v1.1.0.

So how I update it if I have profiles/libraries as path and not sites/all/libraries?

  • The library belongs to the drupal profile.

I run drush help chosenplugin but it only says:

Arguments: path Optional. A path where to install the chosen plugin. If committed Drush will use the default location.

I know that the default location is sites/libraries BUT IN MY CASE the PATH would be: profiles/myprofile/libraries/chosen SO in this case if I do the libray update with the command drush chosenplugin then how I set up the path in this command? the help just says that i can use path as argument but does not say how to set it...

If there is no way to update it through drush then please provideme a guide how to update the chosen library by using git... knowing that the library url in git is: https://github.com/harvesthq/chosen.git

PLEASE HELP!!!!! :)

Thank you everyone!!!

Liz

  • if the library is not part of the profile, you can have it in all/libraries as well - just make sure the folder exists. try running drush with the -d switch, that will give us more info about the problem. also try drush help chosenplugin - apparently you can give it the path as argument. – mojzis Jul 20 '14 at 22:00
  • Problem is that library is part of the profile. I run drush help chosenplugin but it also says: Arguments: path Optional. A path where to install the chosen plugin. If ommited Drush will use the default location. – Liz Jul 23 '14 at 14:03
  • Problem is that library is part of the profile. I run drush help chosenplugin but it also says: Arguments: path Optional. A path where to install the chosen plugin. If committed Drush will use the default location. I know that the default location is sites/libraries BUT IN MY CASE the PATH would be: profiles/myprofile/libraries/chosen SO in this case if I do the libray update with the command drush chosenplugin then how I set up the path in this command? the help just says that i can use path as argument but does not says how to set it... please help!!! THANK YOU!!! – Liz Jul 23 '14 at 14:14
  • drush chosenplugin --path=profiles/myprofile/libraries/chosen – mojzis Jul 23 '14 at 17:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.