Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKate Butler <kate@innocraft.com>2019-03-02 06:48:13 +0300
committerdiosmosis <diosmosis@users.noreply.github.com>2019-03-02 06:48:13 +0300
commit0e3c30ba31790bbe2318b46a4e6fc7114b3c4e50 (patch)
treed11f5b9de655816e5227bfbe8ac503d93d98cc06 /plugins/CoreConsole
parent8ac338d36bd3b3a7edaa5a5e4200e3a675235ffd (diff)
Report an error when the bzopen fails (#14145)
Diffstat (limited to 'plugins/CoreConsole')
-rw-r--r--plugins/CoreConsole/Commands/DevelopmentSyncProcessedSystemTests.php24
1 files changed, 17 insertions, 7 deletions
diff --git a/plugins/CoreConsole/Commands/DevelopmentSyncProcessedSystemTests.php b/plugins/CoreConsole/Commands/DevelopmentSyncProcessedSystemTests.php
index b5b7d9d657..4957e51b64 100644
--- a/plugins/CoreConsole/Commands/DevelopmentSyncProcessedSystemTests.php
+++ b/plugins/CoreConsole/Commands/DevelopmentSyncProcessedSystemTests.php
@@ -65,12 +65,15 @@ class DevelopmentSyncProcessedSystemTests extends ConsoleCommand
$tar = new Tar($tarFile, 'bz2');
- $tar->extract($targetDir);
-
- $this->writeSuccessMessage($output, array(
- 'All processed system test results were copied to <comment>' . $targetDir . '</comment>',
- 'Compare them with the expected test results and commit them if needed.'
- ));
+ if ($tar->extract($targetDir)) {
+ $this->writeSuccessMessage($output, array(
+ 'All processed system test results were copied to <comment>' . $targetDir . '</comment>',
+ 'Compare them with the expected test results and commit them if needed.'
+ ));
+ } else {
+ $output->write('<error>' . $tar->errorInfo() . '.</error>');
+ $output->writeln('<error> Check that you have the PHP bz2 extension installed and try again.');
+ }
unlink($tarFile);
}
@@ -100,7 +103,14 @@ class DevelopmentSyncProcessedSystemTests extends ConsoleCommand
$extractionTarget = $tmpDir . '/artifacts';
Filesystem::mkdir($extractionTarget);
- $tar->extract($extractionTarget);
+
+ $success = $tar->extract($extractionTarget);
+ if (! $success) {
+ $output->write('<error>' . $tar->errorInfo() . '.</error>');
+ $output->writeln('<error> Check that you have the PHP bz2 extension installed and try again.');
+ unlink($tarFile);
+ return;
+ }
$artifacts = Filesystem::globr($extractionTarget, '*~~*');