From 25882999fb6ba3c16451a0d466144ccd24684ffc Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Mon, 10 Aug 2015 17:00:45 +0200 Subject: make error output prettier --- command/verifyinstall.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'command') 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('Installation verified, encountered ' . - 'multiple errors: '); foreach ($missing as $path) { - $output->writeln('' . $path . ' is missing!'); + $output->writeln('Missing file: ' . $path); } foreach ($errors as $path) { - $output->writeln('' . $path . ' does not match the ' . - 'recorded checksum!'); + $output->writeln('Invalid checksum: ' . $path); } $output->writeln("\nYour News installation does not " . 'match the recorded files and versions. This ' . -- cgit v1.2.3