Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[FrameworkBundle] Ignore failures when removing the old cache dir #25078

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 21, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Component\Filesystem\Exception\IOException;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\HttpKernel\CacheClearer\CacheClearerInterface;
use Symfony\Component\HttpKernel\KernelInterface;
Expand Down Expand Up @@ -130,7 +131,11 @@ protected function execute(InputInterface $input, OutputInterface $output)
$io->comment('Removing old cache directory...');
}

$this->filesystem->remove($oldCacheDir);
try {
$this->filesystem->remove($oldCacheDir);
} catch (IOException $e) {
$io->warning($e->getMessage());
}

if ($output->isVerbose()) {
$io->comment('Finished');
Expand Down