:100644 100644 42ba320... 0000000... M src/IDF/Plugin/SyncGit/Serve.php diff --git a/src/IDF/Plugin/SyncGit/Serve.php b/src/IDF/Plugin/SyncGit/Serve.php index 42ba320..318c074 100644 --- a/src/IDF/Plugin/SyncGit/Serve.php +++ b/src/IDF/Plugin/SyncGit/Serve.php @@ -194,9 +194,25 @@ class IDF_Plugin_SyncGit_Serve exec(sprintf(Pluf::f('idf_exec_cmd_prefix', ''). 'git --git-dir=%s init', escapeshellarg($fullpath)), $out, $res); - if ($res != 0) { - throw new Exception(sprintf('Init repository error, exit status %d.', $res)); + self::_execLog($res,$out,sprintf('Init repository error, exit status %d.', $res)) + or throw new Exception(sprintf('Init repository error, exit status %d.', $res)); + } + + protected function _execLog($result, $out, $error) { + if ($result != 0) { + $date = date('H:i:s M d, Y'); + $out = implode("\n",$out); + $text = <<