Skip to content

Commit bd936ef

Browse files
committed
Skip cleanup also if tooly has no tools to manage
1 parent b076474 commit bd936ef

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Script/Processor.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,11 @@ private function removeFromDir($dir, array $excludeToolNames = [])
131131
// Get the tools managed by tooly
132132
$tools = $this->configuration->getTools();
133133

134+
// If no tools exist, there is nothing more to do here.
135+
if (0 === count($tools)) {
136+
return;
137+
}
138+
134139
foreach (scandir($dir) as $entry) {
135140
$path = $dir . DIRECTORY_SEPARATOR . $entry;
136141

0 commit comments

Comments
 (0)