Skip to content

Commit 3c93609

Browse files
committed
fixed a minor issue
1 parent c50150b commit 3c93609

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

src/Retention.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -185,17 +185,17 @@ public function apply(string $baseDir): Result
185185
$this->logger->notice('There must be at least one file to keep.', [
186186
'baseDir' => $baseDir,
187187
]);
188-
return $keepList;
189-
}
190-
191-
if ($this->dryRun) {
192-
$this->logger->debug('No policy applied because of dry-run.');
193188
}
194189
else {
195-
foreach ($pruneList as $fileInfo) {
196-
/** @var FileInfo $fileInfo */
197-
if (!$this->pruneFile($fileInfo)) {
198-
throw new RetentionException("Pruning {$fileInfo->path} failed unexpectedly.");
190+
if ($this->dryRun) {
191+
$this->logger->debug('No policy applied because of dry-run.');
192+
}
193+
else {
194+
foreach ($pruneList as $fileInfo) {
195+
/** @var FileInfo $fileInfo */
196+
if (!$this->pruneFile($fileInfo)) {
197+
throw new RetentionException("Pruning {$fileInfo->path} failed unexpectedly.");
198+
}
199199
}
200200
}
201201
}

0 commit comments

Comments
 (0)