Skip to content

Commit f588975

Browse files
Merge pull request #51 from BlackbitNeueMedien/bugfix/graphviz-installation-error
[Visualization] Show message when graphviz is not installed
2 parents 540c538 + d892e76 commit f588975

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/WorkflowGui/Controller/WorkflowController.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,6 @@ public function visualizeImageAction(Request $request)
333333
$this->isGrantedOr403();
334334

335335
try {
336-
337336
$image = $this->getVisualization($request->get('workflow'), 'png');
338337

339338
$response = new Response();
@@ -363,9 +362,9 @@ public function visualizeImageAction(Request $request)
363362
*/
364363
private function getVisualization($workflow, $format) {
365364
try {
366-
$dotExecutable = Console::getExecutable('dot');
365+
$dotExecutable = Console::getExecutable('dot', true);
367366
} catch(\Exception $e) {
368-
return new Response('Please install graphviz to visualize workflows');
367+
throw new \Exception('Please install graphviz to visualize workflows');
369368
}
370369

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

0 commit comments

Comments
 (0)