From 08d6da9ac1d8b7332e6b3c8a3d0d2b7b6c7cd827 Mon Sep 17 00:00:00 2001 From: Katherine Bailey Date: Mon, 26 Mar 2012 12:54:35 -0700 Subject: [PATCH] Override make method for core in order to run composer install --- commands/make/make.project.inc | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/commands/make/make.project.inc b/commands/make/make.project.inc index 28b2140..5b47a0b 100644 --- a/commands/make/make.project.inc +++ b/commands/make/make.project.inc @@ -437,6 +437,27 @@ class DrushMakeProject_Core extends DrushMakeProject { } return $this->download_location; } + + /** + * Override make function to run composer install if necessary. + * + * This is only needed for a Drupal 8 core that has been cloned from git. + */ + function make() { + parent::make(); + $is_d8 = is_dir($this->download_location . '/core'); + if ($is_d8 && $this->download['type'] == 'git') { + $cwd = getcwd(); + drush_op('chdir', $this->download_location . '/core'); + if (drush_invoke_process('@self', 'composer', array('install'))) { + drush_print('Running the composer command'); + } + else { + drush_print('Error running the composer command. Make sure you have drush composer installed.'); + } + drush_op('chdir', $cwd); + } + } } /** -- 1.7.5.4