Improve output when installing packages

main
Jordi Boggiano 5 years ago
parent 76a2c63bf8
commit f7c1b04a6c
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC

@ -33,16 +33,14 @@ abstract class ArchiveDownloader extends FileDownloader
public function install(PackageInterface $package, $path, $output = true)
{
if ($output) {
$this->io->writeError(" - Installing <info>" . $package->getName() . "</info> (<comment>" . $package->getFullPrettyVersion() . "</comment>)");
$this->io->writeError(" - Installing <info>" . $package->getName() . "</info> (<comment>" . $package->getFullPrettyVersion() . "</comment>): Extracting archive");
} else {
$this->io->writeError('Extracting archive', false);
}
$temporaryDir = $this->config->get('vendor-dir').'/composer/'.substr(md5(uniqid('', true)), 0, 8);
$fileName = $this->getFileName($package, $path);
if ($output) {
$this->io->writeError(' Extracting archive', true, IOInterface::VERBOSE);
}
try {
$this->filesystem->ensureDirectoryExists($temporaryDir);
try {

@ -82,6 +82,8 @@ class PathDownloader extends FileDownloader implements VcsCapableDownloaderInter
$package->getName(),
$package->getFullPrettyVersion()
));
} else {
$this->io->writeError('Source already present', false);
}
return;
@ -163,7 +165,9 @@ class PathDownloader extends FileDownloader implements VcsCapableDownloaderInter
$fileSystem->mirror($realUrl, $path, $iterator);
}
$this->io->writeError('');
if ($output) {
$this->io->writeError('');
}
}
/**
@ -173,7 +177,7 @@ class PathDownloader extends FileDownloader implements VcsCapableDownloaderInter
{
$realUrl = realpath($package->getDistUrl());
if (realpath($path) === $realUrl) {
if ($path === $realUrl) {
if ($output) {
$this->io->writeError(" - Removing <info>" . $package->getName() . "</info> (<comment>" . $package->getFullPrettyVersion() . "</comment>), source is still present in $path");
}

Loading…
Cancel
Save