diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-08-10 17:00:45 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-08-10 17:09:49 +0200 |
commit | 25882999fb6ba3c16451a0d466144ccd24684ffc (patch) | |
tree | fa02a95ec8b4ed1bfcc742ebc7e318adc18119ac /command | |
parent | 6a489df47a1c8fa351e9b43924fc28c3986583bb (diff) |
make error output prettier
Diffstat (limited to 'command')
-rw-r--r-- | command/verifyinstall.php | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/command/verifyinstall.php b/command/verifyinstall.php index d99378dce..bd21185a9 100644 --- a/command/verifyinstall.php +++ b/command/verifyinstall.php @@ -15,6 +15,7 @@ use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Helper\ProgressBar; +use PlasmaConduit\Path; use OCA\News\Utility\FileChecksumValidator; @@ -43,7 +44,7 @@ class VerifyInstall extends Command { foreach($checksums as $file => $checksum) { $progressbar->advance(); - $absPath = realpath($root . $file); + $absPath = Path::normalize($root . $file); if (!file_exists($absPath)) { $missing[] = $absPath; @@ -55,14 +56,11 @@ class VerifyInstall extends Command { $output->writeln("\n"); if (count($errors) > 0 || count($missing) > 0) { - $output->writeln('<error>Installation verified, encountered ' . - 'multiple errors: </error>'); foreach ($missing as $path) { - $output->writeln('<error>' . $path . ' is missing!</error>'); + $output->writeln('<error>Missing file:</error> ' . $path); } foreach ($errors as $path) { - $output->writeln('<error>' . $path . ' does not match the ' . - 'recorded checksum!</error>'); + $output->writeln('<error>Invalid checksum:</error> ' . $path); } $output->writeln("\nYour News installation does not " . 'match the recorded files and versions. This ' . |