Skip to content

Commit

Permalink
feat: use composer dependency if applicable
Browse files Browse the repository at this point in the history
  • Loading branch information
Pascal Küsgen committed Jan 17, 2017
1 parent f68d8e6 commit bd45077
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,16 @@ public function __construct($repoPath = false)
private function initRepo()
{
if (!class_exists("Git")) {
require('Git.php/Git.php');
if (file_exists('Git.php/Git.php')) {
require 'Git.php/Git.php';
} else {
require kirby()->roots()->index() .
DS . 'vendor' . DS . 'pascalmh' . DS . 'git.php' . DS . 'Git.php';
}
}

if (!class_exists("Git")) {
die('Git class not found. Is the Git.php submodule installed?');
}

$this->pullOnChange = c::get('gcapc-pull', false);
Expand Down

0 comments on commit bd45077

Please sign in to comment.