fix: mkdir -p du répertoire parent avant appel Tippecanoe

This commit is contained in:
Gwadaking
2026-04-14 01:58:09 -04:00
parent c134e14ec0
commit 295548b04a

View File

@@ -122,6 +122,11 @@ class GenerateTilesCommand extends Command
private function runTippecanoe(string $geojson, string $outputDir, string $layer, SymfonyStyle $io): void private function runTippecanoe(string $geojson, string $outputDir, string $layer, SymfonyStyle $io): void
{ {
$parentDir = dirname($outputDir);
if (!is_dir($parentDir)) {
mkdir($parentDir, 0755, true);
}
$tmpFile = sys_get_temp_dir() . '/tiles_' . uniqid() . '.geojson'; $tmpFile = sys_get_temp_dir() . '/tiles_' . uniqid() . '.geojson';
file_put_contents($tmpFile, $geojson); file_put_contents($tmpFile, $geojson);