diff --git a/src/IDF/Scm.php b/src/IDF/Scm.php index 9e8de2d..8ee8c28 100644 --- a/src/IDF/Scm.php +++ b/src/IDF/Scm.php @@ -55,6 +55,9 @@ class IDF_Scm $cache = Pluf_Cache::factory(); if (null === ($res=$cache->get($key))) { $ll = exec($command, $output, $return); + if ($return != 0) { + throw new IDF_Scm_Exception(sprintf('Error when running command: "%s", return code: %d', $command, $return)); + } $cache->set($key, array($ll, $return, $output)); } else { list($ll, $return, $output) = $res; diff --git a/src/IDF/Scm/Exception.php b/src/IDF/Scm/Exception.php new file mode 100644 index 0000000..eae2fd6 --- /dev/null +++ b/src/IDF/Scm/Exception.php @@ -0,0 +1,26 @@ +