Make package removals async as well, refs #9618
parent
a5fecc4720
commit
67261e8d47
|
@ -380,9 +380,13 @@ class FileDownloader implements DownloaderInterface, ChangeReportInterface
|
|||
if ($output) {
|
||||
$this->io->writeError(" - " . UninstallOperation::format($package));
|
||||
}
|
||||
if (!$this->filesystem->removeDirectory($path)) {
|
||||
$promise = $this->filesystem->removeDirectoryAsync($path);
|
||||
|
||||
return $promise->then(function($result) use ($path) {
|
||||
if (!$result) {
|
||||
throw new \RuntimeException('Could not completely delete '.$path.', aborting.');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -215,9 +215,14 @@ abstract class VcsDownloader implements DownloaderInterface, ChangeReportInterfa
|
|||
public function remove(PackageInterface $package, $path)
|
||||
{
|
||||
$this->io->writeError(" - " . UninstallOperation::format($package));
|
||||
if (!$this->filesystem->removeDirectory($path)) {
|
||||
|
||||
$promise = $this->filesystem->removeDirectoryAsync($path);
|
||||
|
||||
return $promise->then(function($result) use ($path) {
|
||||
if (!$result) {
|
||||
throw new \RuntimeException('Could not completely delete '.$path.', aborting.');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue