Skip to content

Commit f9e0b1e

Browse files
committed
better handling of missing directory
1 parent 00e3c4a commit f9e0b1e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/PatternLab/Builder.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use \PatternLab\Config;
1717
use \PatternLab\Data;
1818
use \PatternLab\Dispatcher;
19+
use \PatternLab\FileUtil;
1920
use \PatternLab\Parsers\Documentation;
2021
use \PatternLab\PatternData\Exporters\NavItemsExporter;
2122
use \PatternLab\PatternData\Exporters\PatternPartialsExporter;
@@ -121,7 +122,7 @@ protected function generateIndex() {
121122

122123
// double-check that the data directory exists
123124
if (!is_dir($dataDir)) {
124-
mkdir($dataDir);
125+
FileUtil::makeDir($dataDir);
125126
}
126127

127128
$output = "";

0 commit comments

Comments
 (0)