コード例 #1
0
 private function error($text)
 {
     cli\err('%rFinished with error: ' . $text . '%n');
     exit;
 }
コード例 #2
0
ファイル: Setup.php プロジェクト: stevegrunwell/githookd
 /**
  * Verify that necessary file directories are in place.
  *
  * @return bool True if everything's as it should be, false otherwise.
  */
 protected function verifyDirectories()
 {
     if (!is_dir($this->getProjectDir() . '/.git')) {
         cli\err('No .git directory found in your project, unable to copy Git hooks!');
         return false;
     } elseif (!is_dir($this->getProjectDir() . '/.git/hooks')) {
         cli\output('Creating hooks directory in Git repository');
         if (!mkdir($this->getProjectDir() . '/.git/hooks')) {
             cli\err('An error occurred creating .git/hooks, unable to proceed!');
             return;
         }
         return false;
     }
     return true;
 }