From c7396f77b38b3b97e9f699fa2847940efc0244e7 Mon Sep 17 00:00:00 2001 From: Guntis Date: Tue, 18 Feb 2020 01:19:57 +0200 Subject: [PATCH] Allow url alias for drush. --- src/Codeception/Module/DrupalDrush.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Codeception/Module/DrupalDrush.php b/src/Codeception/Module/DrupalDrush.php index d6c8e92..046e3b2 100644 --- a/src/Codeception/Module/DrupalDrush.php +++ b/src/Codeception/Module/DrupalDrush.php @@ -14,6 +14,7 @@ * - DrupalDrush: * working_directory: './web' * drush: './vendor/bin/drush' + * alias: '@mysite.com' * options: * uri: http://mydomain.com * root: /app/web @@ -29,6 +30,7 @@ class DrupalDrush extends Module { */ protected $config = [ 'drush' => 'drush', + 'alias' => '', 'options' => [], ]; @@ -45,6 +47,9 @@ class DrupalDrush extends Module { * The process output. */ public function runDrush($command, array $options = []) { + if ($alias = $this->_getConfig('alias')) { + $command = $alias . ' ' . $command; + } if (!empty($options)) { $command = $this->normalizeOptions($options) . $command; }