Commit 2865924c authored by Fabian Riethmayer's avatar Fabian Riethmayer

Always display exec() output if debug is set

parent 22584594
......@@ -184,9 +184,14 @@ function createMedia($path, $filename, $config) {
* exit(1) on error
*/
function cmdExec($cmd) {
global $debug;
exec($cmd . " 2>&1", $result, $return);
if ($return !== 0) {
if ($debug || $return !== 0) {
print_r($result);
}
if ($return !== 0) {
exit(1);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment