Skip to content

Commit 6b01505

Browse files
authored
Merge pull request #5 from ensi-platform/task-87992
#87992 create folder for client if it doesnt exist
2 parents a5c8fe7 + 16cce4f commit 6b01505

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Commands/GenerateClient.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,10 @@ private function recursiveClearDirectory(string $dir, int $level = 0)
185185
return;
186186
}
187187

188+
if ($level === 0 && !is_dir($dir)) {
189+
mkdir($dir, 0755, true);
190+
}
191+
188192
foreach (scandir($dir) as $fileWithoutDir) {
189193
if (in_array($fileWithoutDir, ['..', '.'])) {
190194
continue;

0 commit comments

Comments
 (0)