We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 06588ca commit 5596b42Copy full SHA for 5596b42
1 file changed
src/Console/Command/Static/CleanCommand.php
@@ -259,6 +259,8 @@ private function cleanGenerated(): int
259
try {
260
// Get all items in generated directory
261
$items = $generatedDirectory->read();
262
+ $deletedCount = 0;
263
+
264
foreach ($items as $item) {
265
// Skip .htaccess file
266
if ($item === '.htaccess') {
@@ -267,12 +269,13 @@ private function cleanGenerated(): int
267
269
268
270
271
$generatedDirectory->delete($item);
272
+ $deletedCount++;
273
} catch (\Exception $e) {
274
$this->io->writeln(sprintf(' <fg=red>✗</> Failed to clean: generated/%s - %s', $item, $e->getMessage()));
275
}
276
277
- if (!empty($items)) {
278
+ if ($deletedCount > 0) {
279
$this->io->writeln(' <fg=green>✓</> Cleaned: generated/*');
280
$cleaned++;
281
0 commit comments