Skip to content

Commit 45a3788

Browse files
committed
handling merging of plugin data
1 parent 64176a8 commit 45a3788

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/PatternLab/Config.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,8 @@ public static function updateConfigOption($optionName,$optionValue, $force = fal
327327

328328
// standardize the values for comparison
329329
$currentOption = self::getOption($optionName);
330-
$currentOptionValue = $currentOption;
331-
$newOptionValue = $optionValue;
330+
$currentOptionValue = isset($currentOption["plugins"]) ? $currentOption["plugins"] : $currentOption;
331+
$newOptionValue = isset($optionValue["plugins"]) ? $optionValue["plugins"] : $optionValue;
332332

333333
if ($currentOptionValue != $newOptionValue) {
334334

@@ -341,8 +341,16 @@ public static function updateConfigOption($optionName,$optionValue, $force = fal
341341
$input = Console::promptInput($prompt,$options,"Y");
342342

343343
if ($input == "y") {
344+
345+
// handle plug-in values
346+
if (isset($optionValue["plugins"])) {
347+
$optionValue = array_replace_recursive($currentOption, $optionValue);
348+
}
349+
350+
// update the config option
344351
self::writeUpdateConfigOption($optionName,$optionValue);
345352
Console::writeInfo("config option ".$optionName." updated...", false, true);
353+
346354
} else {
347355
Console::writeWarning("config option <desc>".$optionName."</desc> not updated...", false, true);
348356
}

0 commit comments

Comments
 (0)