Browse Source

Added setenv() to update profile

pull/24/head
Teknikode 8 years ago
parent
commit
0238a695ee
  1. 2
      includes/Git.php
  2. 1
      includes/update_profile.php

2
includes/Git.php

@ -286,7 +286,7 @@ class GitRepo { @@ -286,7 +286,7 @@ class GitRepo {
} else {
$env = array_merge($_ENV, $this->envopts);
}
print_r($_ENV);
print_r($env);
$cwd = $this->repo_path;
$resource = proc_open($command, $descriptorspec, $pipes, $cwd, $env);
$stdout = stream_get_contents($pipes[1]);

1
includes/update_profile.php

@ -134,6 +134,7 @@ if(isset($_POST)) @@ -134,6 +134,7 @@ if(isset($_POST))
$Git = new Git();
$Git->windows_mode();
$repo = $Git->open($CONF['git_repo_path'][0].'gitolite-admin\\');
$repo->setenv('HOME', '/home/iusr');
echo "user: ".trim(shell_exec('whoami'))."<br />";
echo "uid: ".getmyuid()."<br />";
echo "gid: ".getmygid()."<br />";

Loading…
Cancel
Save