Browse Source

Testing new exec method

pull/24/head
Teknikode 8 years ago
parent
commit
fda6420056
  1. 6
      includes/Git.php

6
includes/Git.php

@ -288,16 +288,18 @@ class GitRepo { @@ -288,16 +288,18 @@ class GitRepo {
}
$cwd = $this->repo_path;
/*
$resource = proc_open($command, $descriptorspec, $pipes, $cwd, $env);
$stdout = stream_get_contents($pipes[1]);
$stderr = stream_get_contents($pipes[2]);
foreach ($pipes as $pipe) {
fclose($pipe);
}
echo $stdout;
$status = trim(proc_close($resource));
if ($status) throw new Exception($stderr);
//exec($command, $stdout);
*/
exec("cd \"".$cwd."\"", $stdout);
exec($command, $stdout);
return $stdout;
}

Loading…
Cancel
Save