Should fix failing travis builds

This commit is contained in:
Dane Everitt 2017-07-23 17:55:38 -05:00
parent 7f0130100d
commit ebb3a01036
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
6 changed files with 19 additions and 28 deletions

View file

@ -73,7 +73,10 @@ class AppServiceProvider extends ServiceProvider
return Cache::remember('git-version', 5, function () {
if (file_exists(base_path('.git/HEAD'))) {
$head = explode(' ', file_get_contents(base_path('.git/HEAD')));
$path = base_path('.git/' . trim($head[1]));
if (array_key_exists(1, $head)) {
$path = base_path('.git/' . trim($head[1]));
}
}
if (isset($path) && file_exists($path)) {