diff --git a/core/lib/Drupal/Core/Composer/Composer.php b/core/lib/Drupal/Core/Composer/Composer.php
index 1b439af..2f1310f 100644
--- a/core/lib/Drupal/Core/Composer/Composer.php
+++ b/core/lib/Drupal/Core/Composer/Composer.php
@@ -10,7 +10,6 @@
use Drupal\Component\PhpStorage\FileStorage;
use Composer\Script\Event;
use Composer\Installer\PackageEvent;
-use Composer\IO\IOInterface;
use Composer\Semver\Constraint\Constraint;
/**
@@ -160,11 +159,13 @@ public static function vendorTestCodeCleanup(PackageEvent $event) {
}
$package_key = static::findPackageKey($package->getName());
$message = sprintf(" Processing %s", $package->getPrettyName());
- $io->write($message, TRUE, IOInterface::VERY_VERBOSE);
+ if ($io->isVeryVerbose()) {
+ $io->write($message);
+ }
if ($package_key) {
foreach (static::$packageToCleanup[$package_key] as $path) {
$dir_to_remove = $vendor_dir . '/' . $package_key . '/' . $path;
- $verbosity = IOInterface::VERY_VERBOSE;
+ $print_message = $io->isVeryVerbose();
if (is_dir($dir_to_remove)) {
if (static::deleteRecursive($dir_to_remove)) {
$message = sprintf(" Removing directory '%s'", $path);
@@ -173,7 +174,7 @@ public static function vendorTestCodeCleanup(PackageEvent $event) {
// Always display a message if this fails as it means something has
// gone wrong. Therefore the message has to include the package name
// as the first informational message might not exist.
- $verbosity = IOInterface::QUIET;
+ $print_message = TRUE;
$message = sprintf(" Failure removing directory '%s' in package %s.", $path, $package->getPrettyName());
}
}
@@ -182,11 +183,15 @@ public static function vendorTestCodeCleanup(PackageEvent $event) {
// include the directory this is not an error.
$message = sprintf(" Directory '%s' does not exist", $path);
}
- $io->write($message, TRUE, $verbosity);
+ if ($print_message) {
+ $io->write($message);
+ }
}
- // Add a new line to separate this output from the next package.
- $io->write("", TRUE, IOInterface::VERY_VERBOSE);
+ if ($io->isVeryVerbose()) {
+ // Add a new line to separate this output from the next package.
+ $io->write("");
+ }
}
}