Skip to content

Commit

Permalink
Merge tag '3.0.22' into develop
Browse files Browse the repository at this point in the history
tagging 3.0.22
  • Loading branch information
stmh committed Sep 12, 2019
2 parents 0667ed1 + 526f613 commit 8a45c0e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
10 changes: 10 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 3.0.22 / 2019-09-12

### New

* Add support sql-sanitize for reset task

### Fixed

* Fix for exception after certain docker commands.

## 3.0.21 / 2019-08-21

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion src/Method/DockerMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ private function runTaskImpl(HostConfig $host_config, TaskContextInterface $cont

/** @var CommandResult $cr */
$cr = $context->getResult('commandResult', false);
if ($cr->failed()) {
if ($cr && $cr->failed()) {
$cr->throwException(sprintf('Docker task `%s` failed!', $task));
}
}
Expand Down
7 changes: 6 additions & 1 deletion src/Method/DrushMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,9 @@ public function getDefaultConfig(ConfigurationService $configuration_service, ar
$config['drushVersion'] = in_array('drush9', $host_config['needs'])
? 9
: $configuration_service->getSetting('drushVersion', 8);

$config['sqlDumpCommand'] = 'sql-dump';
$config['sanitizeOnReset'] = false;
$config['supportsZippedBackups'] = true;
$config['siteFolder'] = '/sites/default';
$config['filesFolder'] = '/sites/default/files';
Expand Down Expand Up @@ -176,6 +177,10 @@ public function reset(HostConfig $host_config, TaskContextInterface $context)
/** @var ScriptMethod $script_method */
$script_method = $context->getConfigurationService()->getMethodFactory()->getMethod('script');

if ($host_config->get('sanitizeOnReset', false)) {
$this->runDrush( $shell,'sql-sanitize -y');
}

if ($host_config->isType(HostType::DEV)) {
$admin_user = $host_config['adminUser'];

Expand Down

0 comments on commit 8a45c0e

Please sign in to comment.