mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 04:40:44 +02:00
Check for custom-git path in e107_config.php (define('e_GIT', 'path-to-git'); ) May solve "sh: git command not found" errors.
This commit is contained in:
@@ -41,18 +41,20 @@ class _system_cron
|
|||||||
if(is_dir(e_BASE.".git")) // Check it's a Git Repo
|
if(is_dir(e_BASE.".git")) // Check it's a Git Repo
|
||||||
{
|
{
|
||||||
|
|
||||||
|
$gitPath = defset('e_GIT','git'); // addo to e107_config.php to
|
||||||
|
|
||||||
// Change Dir.
|
// Change Dir.
|
||||||
$cmd = 'cd '.e_ROOT;
|
$cmd = 'cd '.e_ROOT;
|
||||||
$mes->addDebug($cmd);
|
$mes->addDebug($cmd);
|
||||||
$text .= `$cmd 2>&1`;
|
$text = `$cmd 2>&1`;
|
||||||
|
|
||||||
// Remove any local changes.
|
// Remove any local changes.
|
||||||
$cmd = 'git reset --hard';
|
$cmd = $gitPath.' reset --hard';
|
||||||
$mes->addDebug($cmd);
|
$mes->addDebug($cmd);
|
||||||
$text .= `$cmd 2>&1`;
|
$text .= `$cmd 2>&1`;
|
||||||
|
|
||||||
// Run Pull request
|
// Run Pull request
|
||||||
$cmd = 'git pull';
|
$cmd = $gitPath.' pull';
|
||||||
$mes->addDebug($cmd);
|
$mes->addDebug($cmd);
|
||||||
$text .= `$cmd 2>&1`;
|
$text .= `$cmd 2>&1`;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user