Skip to content

Commit

Permalink
Allow url alias for drush.
Browse files Browse the repository at this point in the history
  • Loading branch information
guncha25 committed Feb 17, 2020
1 parent 8797cae commit c7396f7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Codeception/Module/DrupalDrush.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* - DrupalDrush:
* working_directory: './web'
* drush: './vendor/bin/drush'
* alias: '@mysite.com'
* options:
* uri: http://mydomain.com
* root: /app/web
Expand All @@ -29,6 +30,7 @@ class DrupalDrush extends Module {
*/
protected $config = [
'drush' => 'drush',
'alias' => '',
'options' => [],
];

Expand All @@ -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;
}
Expand Down

0 comments on commit c7396f7

Please sign in to comment.