Skip to content

Commit

Permalink
Merge pull request #51 from BlackbitNeueMedien/bugfix/graphviz-instal…
Browse files Browse the repository at this point in the history
…lation-error

[Visualization] Show message when graphviz is not installed
  • Loading branch information
dpfaffenbauer authored Nov 9, 2020
2 parents 540c538 + d892e76 commit f588975
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/WorkflowGui/Controller/WorkflowController.php
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,6 @@ public function visualizeImageAction(Request $request)
$this->isGrantedOr403();

try {

$image = $this->getVisualization($request->get('workflow'), 'png');

$response = new Response();
Expand Down Expand Up @@ -363,9 +362,9 @@ public function visualizeImageAction(Request $request)
*/
private function getVisualization($workflow, $format) {
try {
$dotExecutable = Console::getExecutable('dot');
$dotExecutable = Console::getExecutable('dot', true);
} catch(\Exception $e) {
return new Response('Please install graphviz to visualize workflows');
throw new \Exception('Please install graphviz to visualize workflows');
}

$cliCommand = '"'.Console::getPhpCli().'" "'.PIMCORE_PROJECT_ROOT . '/bin/console" pimcore:workflow:dump '.$workflow.' | "'.$dotExecutable.'" -T'.$format;
Expand Down

0 comments on commit f588975

Please sign in to comment.