Git local repo in combination with Acquia Cloud Dev repo adding contributed modules with Drush
-
01-10-2020 - |
Question
I try to add contributed modules to my local repo following this article.
curl https://ftp.drupal.org/files/projects/admin_toolbar-8.x-1.14.tar.gz | tar fz
Its not placing the .tar.gz
file in my local repo?
What I'm doing wrong? After (when it's placed) I want to extract the folder and commit the module. Is this best practice adding contributed modules to my local repo or do i have to use Drush, and if so how do I have to use it in combination with my Git/Drupal workflow?
Update:
- I used Drush
drush dl admin_toolbar
to add the module. - I committed the module and pushed it to my Acquia Cloud Dev environment
- Now from Acquia Dev Desktop
SSH to this server
I want to usedrush en admin_toolbar
. But then I get this message:
Command pm-enable needs a higher bootstrap level to run - you will [error] need to invoke drush from a more functional Drupal environment to run this command. The drush command 'en admin_toolbar' could not be executed. [error]
Can't I use Drush to enable modules on Acquia Cloud Dev environment?
Is this the preferred, most fast/handiest workflow, or is there a better workflow to use (when you use a locally cloned repo in combination with Acquia Cloud?
Solution
The right command is:
curl https://ftp.drupal.org/files/projects/admin_toolbar-8.x-1.14.tar.gz | tar xz
f
process a file, but you want to process the standard input (provided by curl). So remove the f and add the x
option to uncompress file.
Anyway I think is better to use Drush. Drush can handle dependencies (it can download dependant modules when you enable a module) and is easier to use:
drush dl admin_toolbar