1
0
Fork 0

Let the user know a package is being removed

pull/635/head^2
Jordi Boggiano 2012-04-27 19:23:35 +02:00
parent f4d5568937
commit b99f9bae60
2 changed files with 2 additions and 0 deletions

View File

@ -101,6 +101,7 @@ class FileDownloader implements DownloaderInterface
*/ */
public function remove(PackageInterface $package, $path) public function remove(PackageInterface $package, $path)
{ {
$this->io->write(" - Removing package <info>" . $package->getName() . "</info> (<comment>" . $package->getPrettyVersion() . "</comment>)");
if (!$this->filesystem->removeDirectory($path)) { if (!$this->filesystem->removeDirectory($path)) {
throw new \RuntimeException('Could not completely delete '.$path.', aborting.'); throw new \RuntimeException('Could not completely delete '.$path.', aborting.');
} }

View File

@ -77,6 +77,7 @@ abstract class VcsDownloader implements DownloaderInterface
public function remove(PackageInterface $package, $path) public function remove(PackageInterface $package, $path)
{ {
$this->enforceCleanDirectory($path); $this->enforceCleanDirectory($path);
$this->io->write(" - Removing package <info>" . $package->getName() . "</info> (<comment>" . $package->getPrettyVersion() . "</comment>)");
if (!$this->filesystem->removeDirectory($path)) { if (!$this->filesystem->removeDirectory($path)) {
throw new \RuntimeException('Could not completely delete '.$path.', aborting.'); throw new \RuntimeException('Could not completely delete '.$path.', aborting.');
} }