From 52195d2a247aea5123d460591f3496fab1c1ff4e Mon Sep 17 00:00:00 2001 From: Joao Patricio Date: Fri, 24 Aug 2018 14:10:00 +0100 Subject: [PATCH] fix: Assert that the comparison process depending of external node applications executes OK. --- src/VisualDiff.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/VisualDiff.php b/src/VisualDiff.php index 44c5610..ab61aec 100644 --- a/src/VisualDiff.php +++ b/src/VisualDiff.php @@ -137,5 +137,8 @@ protected function callDiff(array $command) if ($process->isSuccessful()) { return rtrim($process->getOutput()); } + + $message = 'Could not run the Node process. Probably a missing NPM dependency.' . PHP_EOL . PHP_EOL; + throw new \RuntimeException($message . $process->getErrorOutput(), 1); } -} \ No newline at end of file +}