Used filesystem check instead of cache check for preview generation

This commit is contained in:
Alejandro Celaya
2016-08-18 13:20:57 +02:00
parent 2c91ded514
commit fac519699a
5 changed files with 47 additions and 39 deletions

View File

@@ -78,10 +78,12 @@ class GeneratePreviewCommand extends Command
$this->previewGenerator->generatePreview($url);
$output->writeln($this->translator->translate(' <info>Success!</info>'));
} catch (PreviewGenerationException $e) {
$output->writeln([
' <error>' . $this->translator->translate('Error') . '</error>',
'<error>' . $e->__toString() . '</error>',
]);
$messages = [' <error>' . $this->translator->translate('Error') . '</error>'];
if ($output->isVerbose()) {
$messages[] = '<error>' . $e->__toString() . '</error>';
}
$output->writeln($messages);
}
}
}