-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Closed
Description
Symfony version(s) affected:5.2.0-BETA1
Description
Exception Cannot rename because the target ".../var/cache/de~" already exists.
How to reproduce
Every second run bin/console c:c
will fail
Possible solution
The problem is in
if ($oldBuildDir) { // /var/cache/de~
$fs->rename($realBuildDir, $oldBuildDir);
} else {
$fs->remove($realBuildDir);
}
if ($oldCacheDir) { // /var/cache/de~
$fs->rename($realCacheDir, $oldCacheDir); // Exception
} else {
$fs->remove($realCacheDir);
}
$oldBuildDir
and $oldCacheDir
is equal
Additional context
This bug was introduced in #36515
/cc @mnapoli