Skip to content

Commit 00e3c4a

Browse files
committed
if public dir is missing PL will build it
1 parent e1dce36 commit 00e3c4a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/PatternLab/InstallerUtil.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
use \PatternLab\Config;
1616
use \PatternLab\Console;
17+
use \PatternLab\FileUtil;
1718
use \PatternLab\Timer;
1819
use \Symfony\Component\Filesystem\Filesystem;
1920
use \Symfony\Component\Filesystem\Exception\IOExceptionInterface;
@@ -62,7 +63,13 @@ protected static function init() {
6263
// make sure the source dir is set-up
6364
$sourceDir = Config::getOption("sourceDir");
6465
if (!is_dir($sourceDir)) {
65-
mkdir($sourceDir);
66+
FileUtil::makeDir($sourceDir);
67+
}
68+
69+
// make sure the public dir is set-up
70+
$publicDir = Config::getOption("publicDir");
71+
if (!is_dir($publicDir)) {
72+
FileUtil::makeDir($publicDir);
6673
}
6774

6875
Dispatcher::init();

0 commit comments

Comments
 (0)