Skip to content

Commit

Permalink
Merge pull request #62 from andrehoffmann30/bugfix/adjust-db-setup-co…
Browse files Browse the repository at this point in the history
…mmand

BUGFIX: add recursive directory creation in setup db command
  • Loading branch information
mhsdesign authored Jul 27, 2024
2 parents f03d7c1 + 1c4d62e commit 3a29d02
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Classes/Command/SetupCommandController.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
use Neos\Setup\Domain\CliEnvironment;
use Neos\Setup\Domain\HealthcheckEnvironment;
use Neos\Setup\Infrastructure\HealthChecker;
use Neos\Setup\RequestHandler\SetupCliRequestHandler;
use Neos\Utility\Arrays;
use Neos\Setup\Exception as SetupException;
use Neos\Setup\Infrastructure\Database\DatabaseConnectionService;
use Symfony\Component\Yaml\Yaml;
use Neos\Utility\Files;

class SetupCommandController extends CommandController
{
Expand Down Expand Up @@ -185,6 +185,7 @@ private function writeSettings(string $filename, string $path, $settings): strin
$previousSettings = [];
}
$newSettings = Arrays::setValueByPath($previousSettings, $path, $settings);
Files::createDirectoryRecursively(dirname($filename));
file_put_contents($filename, YAML::dump($newSettings, 10, 2));
return YAML::dump(Arrays::setValueByPath([], $path, $settings), 10, 2);
}
Expand Down

0 comments on commit 3a29d02

Please sign in to comment.