Upstream composer/satis state of the touched files before 85d7736744

This commit is contained in:
upstream committed 2026-10-14 19:40:29 +02:00
1 parent a0d660f831
commit a12177f2cb
2 files changed
+2 -134

No files matched your search

+2 -18
View File
@@ -16,7 +16,6 @@ namespace Composer\Satis\Console\Command;
use Composer\Command\BaseCommand;
use Composer\Json\JsonFile;
use Composer\Satis\PackageSelection\PackageSelection;
use Composer\Util\Filesystem;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
@@ -128,24 +127,9 @@ class PurgeCommand extends BaseCommand
return 0;
}
$filesystem = new Filesystem();
foreach ($unreferenced as $currentFile) {
if (!$dryRun) {
try {
$filesystem->unlink($currentFile->getPathname());
} catch (\RuntimeException $exception) {
// Another process, e.g. a concurrent build or purge, may have removed the archive already.
if (file_exists($currentFile->getPathname())) {
throw $exception;
}
$output->writeln(sprintf(
'<warning>Skipped missing archive</warning>: <comment>%s</comment>',
$currentFile->getRelativePathname()
));
continue;
}
unlink($currentFile->getPathname());
}
$output->writeln(sprintf(
@@ -182,7 +166,7 @@ class PurgeCommand extends BaseCommand
if (is_dir($path)
&& $depth > 0
&& $this->removeEmptyDirectories($output, $path, $depth - 1)
&& @rmdir($path)
&& rmdir($path)
) {
$output->writeln(sprintf('<info>Removed empty directory</info>: <comment>%s</comment>', $path));
} else {