Skip to content

Commit d8071bc

Browse files
committed
fix: patch up api install mode on mac
1 parent a83d13e commit d8071bc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "leafs/cli",
33
"description": "A simple command line tool for installing and interacting with your leaf apps",
44
"homepage": "https://cli.leafphp.dev",
5-
"version": "v4.1.2",
5+
"version": "v4.2",
66
"keywords": [
77
"leaf",
88
"php",

src/CreateCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ protected function handle(): int
151151
\Leaf\FS\File::delete("$directory/package.json");
152152
}
153153

154-
\Leaf\FS\Directory::delete("$directory/app/views");
155-
\Leaf\FS\Directory::delete("$directory/app/routes");
154+
\Leaf\FS\Directory::delete("$directory/app/views", ['recursive' => true]);
155+
\Leaf\FS\Directory::delete("$directory/app/routes", ['recursive' => true]);
156156

157157
\Leaf\FS\Directory::copy(__DIR__ . '/themes/api/routes', "$directory/app/routes");
158158

@@ -214,7 +214,7 @@ protected function handle(): int
214214
}
215215

216216
if ($extraOptions['auth'] ?? false) {
217-
$extraCommands[] = "php leaf scaffold:auth" . ($this->projectType === 'api' ? ' --api' : '');
217+
$extraCommands[] = "php leaf scaffold:auth";
218218
}
219219

220220
if ($extraOptions['tests'] ?? false) {

0 commit comments

Comments
 (0)