Skip to content

Commit

Permalink
Merge branch 'release/3.0.14'
Browse files Browse the repository at this point in the history
  • Loading branch information
stmh committed May 28, 2019
2 parents a0c6f32 + e1bd3af commit a2c2f91
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/Configuration/BlueprintConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,13 @@ public function expandVariants($blueprints)
foreach ($blueprints as $data) {
$template = $this->getTemplate($data['configName']);
foreach ($data['variants'] as $variant) {
$this->configuration->addHost($template->expand($variant));
$host = $template->expand($variant);
if (!$this->configuration->hasHostConfig($host['configName'])) {
$this->configuration->addHost($template->expand($variant));
}
else {
$this->configuration->getLogger()->notice('There\'s an existing config with that name, skipping creating one from blueprint');
}
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions src/Configuration/ConfigurationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -710,4 +710,8 @@ protected function inheritFromBlueprint(string $config_name, $data): array

return $data;
}

public function hasHostConfig($configName) {
return !empty($this->hosts[$configName]);
}
}
2 changes: 1 addition & 1 deletion src/Utilities/Utilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
class Utilities
{

const FALLBACK_VERSION = '3.0.11';
const FALLBACK_VERSION = '3.0.14';

public static function mergeData(array $data, array $override_data): array
{
Expand Down

0 comments on commit a2c2f91

Please sign in to comment.