Skip to content

Commit fd5174e

Browse files
committed
Refine break lines for 'drush updb' command
1 parent f5fe146 commit fd5174e

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/UpdaterCommand.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ protected function execute(InputInterface $input, OutputInterface $output) {
132132
$this->output->writeln('');
133133
$this->printHeader1('3. Updating packages');
134134
$this->updatePackages($this->packagesToUpdate);
135-
$this->output->writeln('');
136135
$this->printHeader1('4. Report');
137136
$this->showUpdatedPackages();
138137

@@ -161,7 +160,7 @@ protected function runDrushCommand(string $command, array $environments = []) {
161160
}
162161

163162
foreach ($environments as $environment) {
164-
$this->output->writeln(sprintf("Running drush %s on the \"%s\" environment:\n", $command, $environment));
163+
$this->output->writeln(sprintf("Running drush %s on the \"%s\" environment.", $command, $environment));
165164
$this->runCommand(sprintf('drush %s %s', $environment, $command));
166165
}
167166
}
@@ -237,6 +236,7 @@ protected function printSummary() {
237236
protected function consolidateConfiguration() {
238237
$this->runDrushCommand('cr');
239238
$this->runDrushCommand('cim -y');
239+
$this->output->writeln('');
240240

241241
foreach ($this->environments as $environment) {
242242
$this->output->writeln(sprintf('Consolidating %s environment', $environment));
@@ -254,10 +254,12 @@ protected function consolidateConfiguration() {
254254
$environment,
255255
$this->commitAuthor
256256
));
257+
$this->output->writeln('');
257258
}
258259

259260
$this->runDrushCommand('cr');
260261
$this->runDrushCommand('cim -y');
262+
$this->output->writeln('');
261263
}
262264

263265
/**
@@ -389,6 +391,7 @@ protected function updatePackage(string $package) {
389391
$this->runDrushCommand('cr');
390392
$this->runDrushCommand('updb -y');
391393
$this->runDrushCommand('cex -y');
394+
$this->output->writeln('');
392395
$this->runCommand('git add config');
393396
}
394397
catch (\Exception $e) {
@@ -401,7 +404,7 @@ protected function updatePackage(string $package) {
401404
$updated_packages = trim($this->runCommand('composer-lock-diff')->getOutput());
402405
if (!empty($updated_packages)) {
403406
$this->output->writeln("Updated packages:");
404-
$this->output->writeln($updated_packages);
407+
$this->output->writeln("$updated_packages\n");
405408
}
406409

407410
$commit_message = $this->calculateModuleUpdateCommitMessage($package);
@@ -584,7 +587,7 @@ protected function showUpdatedPackages() {
584587
$updated_packages = $this->runCommand('composer-lock-diff --from composer.drupalupdater.lock --to composer.lock')->getOutput();
585588
if (!empty($updated_packages)) {
586589
$this->output->writeln(
587-
$updated_packages,
590+
trim($updated_packages),
588591
);
589592
}
590593
else {

0 commit comments

Comments
 (0)